更改Inno Setup卸载程序的默认名称,以避免命名冲突 [英] Change the default name of an Inno Setup uninstaller to avoid naming conflicts

查看:225
本文介绍了更改Inno Setup卸载程序的默认名称,以避免命名冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在同一目录中安装几个安装程序,以使其与Inno Setup卸载程序名称unins000.exeunins000.dat

I need to install a couple of installers in the same directory so it conflicts with the Inno Setup uninstaller name unins000.exe and unins000.dat

是否可以更改Inno Setup卸载程序的默认名称?

Is there a way to change the default name of an Inno Setup uninstaller?

推荐答案

这类似于Elektrostudios的答案,对我有用:

This is similar to Elektrostudios' answer, and is what worked for me:

    Filename: {cmd}; Parameters: "/C Mkdir ""{app}\Uninstallers\{#MyAppName}"""; Flags: RunHidden WaitUntilTerminated
    Filename: {cmd}; Parameters: "/C Move ""{app}\unins000.exe"" ""{app}\Uninstallers\{#MyAppName} - uninstall.exe"""; StatusMsg: Installing {#MyAppName}...; Flags: RunHidden WaitUntilTerminated
    Filename: {cmd}; Parameters: "/C Move ""{app}\unins000.dat"" ""{app}\Uninstallers\{#MyAppName} - uninstall.dat"""; StatusMsg: Installing {#MyAppName}...; Flags: RunHidden WaitUntilTerminated
    Filename: {cmd}; Parameters: "/C Move ""{app}\unins000.msg"" ""{app}\Uninstallers\{#MyAppName} - uninstall.msg"""; StatusMsg: Installing {#MyAppName}...; Flags: RunHidden WaitUntilTerminated
    Filename: REG.exe; Parameters: "ADD ""HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Windows 8 ContextMenu - {#MyAppName}_is1"" /V ""UninstallString"" /T ""REG_SZ"" /D ""\""{app}\Uninstallers\{#MyAppName} - uninstall.exe\"""" /F"; StatusMsg: Installing {#MyAppName}...; Flags: RunHidden WaitUntilTerminated
    Filename: REG.exe; Parameters: "ADD ""HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\Windows 8 ContextMenu - {#MyAppName}_is1"" /V ""QuietUninstallString"" /T ""REG_SZ"" /D ""\""{app}\Uninstallers\{#MyAppName} - uninstall.exe\"" /SILENT"" /F"; StatusMsg: Installing {#MyAppName}...; Flags: RunHidden WaitUntilTerminated

使用Windows 7,我发现"Move"命令将无法工作,除非我有将文件移动到第一个位置的意思,这意味着我必须在顶部添加mkdir行.另外,如果没有移动.msg文件,则卸载程序将无法工作,因此我也遵循该模式并添加了该行.

Using Windows 7, I discovered that the "Move" command wouldn't work unless I had somewhere to move the files to first, meaning that I had to add the mkdir line at the top. Also, the uninstaller wouldn't work without the .msg file moved as well, so I followed the pattern and added that line too.

我没有费心将"Windows 8"更改为"Windows 7",但没有任何区别,所以我不理会它.如果我不知道有问题,我相信有人会在评论中指出.

I didn't bother to change "Windows 8" to "Windows 7" but it didn't make any difference, so I'm leaving it alone. If there's a problem with that I'm unaware of, I'm sure someone will indicate such in a comment.

{#MyAppName}当然是在ISS文件顶部定义的常量,用于声明应用程序的名称.您的常数定义可能有所不同,因此您需要在必要时对其进行更改以匹配.

{#MyAppName} is, of course, the constant defined at the top of the ISS file declaring the name of the application. Your constant may be defined differently, so you'll need to change it to match where necessary.

这篇关于更改Inno Setup卸载程序的默认名称,以避免命名冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆