Inno Setup 支持在同一个目录中安装多个应用程序,所以根据安装的先后次序自动将卸载程序文件命名为 unins000.exe,unins001.exe,unins002.exe 等等。这是 INNO SETUP 自身的功能。请参阅 http://www.jrsoftware.org/iskb.php?uninstallername 。一旦安装过程结束后,你当然可以将卸载文件的名称改成任意其它的文件名,注意的是你除了要更改安装目录里面的 unins00X.exe 和 unins00X.dat,还要更改注册表中的相关卸载信息。由于卸载程序文件的实际位置和名称可以用常量 {uninstallexe} 表示,所以你可以让你的安装程序自动进行这些修改,见示例脚本。以下为引用的内容:; Inno Setup 脚本; 该示例脚本显示如何自定义卸载文件的名称(默认为 unins000.exe,unins001.exe 等等)。[Setup]AppName=自定义卸载文件名示例程序AppVerName=自定义卸载文件名示例程序 1.0DefaultDirName={pf}\自定义卸载文件名示例程序DefaultGroupName=自定义卸载文件名示例程序[Files]Source: “MyProg.exe”; DestDir: “{app}”Source: “MyProg.hlp”; DestDir: “{app}”Source: “Readme.txt”; DestDir: “{app}”[CODE]procedure CurStepChanged(CurStep: TSetupStep);varuninspath, uninsname, NewUninsName, MyAppName: string;beginif CurStep=ssDone thenbegin// 指定新的卸载文件名(不包含扩展名),请相应修改!NewUninsName := ‘卸载’;// 应用程序名称,与 [SEUTP] 段的 AppName 必须一致,请相应修改!MyAppName := ‘自定义卸载文件名示例程序’;// 以下重命名卸载文件uninspath:= ExtractFilePath(ExpandConstant(‘{uninstallexe}’));uninsname:= Copy(ExtractFileName(ExpandConstant(‘{uninstallexe}’)),1,8);RenameFile(uninspath + uninsname + ‘.exe’, uninspath + NewUninsName + ‘.exe’);RenameFile(uninspath + uninsname + ‘.dat’, uninspath + NewUninsName + ‘.dat’);// 以下修改相应的注册表内容if RegKeyExists(HKEY_LOCAL_MACHINE, ‘SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\’ + MyAppName + ‘_is1’) thenbeginRegWriteStringValue(HKEY_LOCAL_MACHINE, ‘SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\’ + MyAppName + ‘_is1’, ‘UninstallString’, ‘”‘ + uninspath + NewUninsName + ‘.exe”‘);RegWriteStringValue(HKEY_LOCAL_MACHINE, ‘SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\’ + MyAppName + ‘_is1’, ‘QuietUninstallString’, ‘”‘ + uninspath + NewUninsName + ‘.exe” /SILENT’);end;end;end;
相关文章
华夏福临门盛世加强版怎么样?产品责任是重中之重
2026年6月24日国寿福庆典版值得买吗?附投保建议
2026年6月24日理财中低风险是几级?中低风险理财会亏吗
2026年6月24日瑞泰泰安心防癌险优缺点是什么?这份分析不容错过
2026年6月24日房贷审批会给家人打电话吗?这种情况不可避免
2026年6月24日李想回怼“增程没有技术含量”质疑:增程的尽头是理想5C增程
2026年6月24日
评论
站内搜索
热门文章
友情链接
- 国旗图片大全
- 倒计时器
- 孕周计算器
- 长度单位转换器
- 大写数字转换器
- 存款利率计算器
- 文本分割器
- favicon generator
- national flag
- email tools
- world market hours
- regex generator
- 娱乐八卦
- free image compressor
- how to delete
- just delete me
- virtual piano
- 风君网络
- wiztree
- wiztree download
- online scoreboard
- morse code translator picture
- morse code translator
- download 7zip
- bandizip
- password remover
- bitumen calculator
- Asphalt Calculator
- random pokemon generator
- vlc播放器下载
- Electricity Bill Calculator
- Elven Name Generator
- Calculate the CPM
- Car logos
- stadium view
- 818 Area Code
- voidimageviewer
- space bar clicker
- starbucks nutrition calculator
- cooking calculator
- FastChart
- Draw A Country
- World TV channels
- 股票模拟器
- lovehub
- video download helper
- 短剧大全
- lagos life simulator
- Unicode to Bamini Converter
- 鲁颁资质
- abb plc
- 济南网站建设
发表回复