如何使用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 (将#修改为@)