微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何使用Inno Setup覆盖第三方安装目录

如何解决如何使用Inno Setup覆盖第三方安装目录

我需要安装嵌入在名为thirdparty-installer.exe的安装程序中的第三方软件,还需要安装我的应用程序Instruct.exe。我的应用程序将位于c:\MyAPP文件夹中,而我所有的第三方文件都必须位于c:\windows\system32中(所有文件都将被扔到system32根目录中)。我已经做了以下事情:

#define OutputDirectory_MPP "c:\myAPP"

[setup]
DefaultDirName=c:\MyAPP
disableDirPage=yes

[dirs]
Name: {#OutputDirectory_MPP}; Attribs: system

[files]
Source: "g:\application\Instruct.exe"; DestDir: {#OutputDirectory_MPP}
Source: "g:\applicationr\thirdparty-installer.exe"; DestDir: "{cf}"; Flags: ignoreversion recursesubdirs createallsubdirs promptifolder; Permissions: system-full;

[Run]
Filename: "{cf}\thirdparty-installer.exe"; Flags: shellexec waituntilterminated 
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName,'&','&&')}}"; Flags: Nowait postinstall skipifsilent

(...)

我的Instruct.exe正常安装,完成后,第三方安装程序将提示并向用户显示更改安装目录的选项。它们的认值为c:\program files\Thirdparty2020\

如何将它们的安装强加在c:\windows\system32文件夹中,而用户别无选择? (甚至可能会进行无提示安装)。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。