[Tool]利用Advanced Installer建立x86/x64在一起的安装程式

时间:2021-09-09 07:03:41

原文 [Tool]利用Advanced Installer建立x86/x64在一起的安装程式

之前使用InstallShield做安装程式时,如果要将程式放在Program Files的话,需要分别针对x86及x64做一份安装程式,详细可参考「[InsallShield]x64无法设定安装目录为C:\Program Files? 」 。

一般来说,大多数的系统不会针对x86 or x64 分别去处理,而同一分安装内容,却要区分x86 or x64 的安装程式,还蛮累人的。

这时,就可以使用Advanced Installer的Mixed 32/64-bit ,来达到这种需求。

1.设定Application Folder 为[AI_ProgramFiles]

[Tool]利用Advanced Installer建立x86/x64在一起的安装程式

2.设定Package Type 为Mixed 32/64-bit matching the platform

在Install Parameters 中,设定Package Type 为Mixed 32/64-bit matching the platform ,如下,

[Tool]利用Advanced Installer建立x86/x64在一起的安装程式

3.将程式拉到Target Computer 中的Application Folder之中

在Resources => Files and Folders 中,将程式拉到Target Computer 中的Application Folder 之中,如下,

[Tool]利用Advanced Installer建立x86/x64在一起的安装程式

这样Build的安装程式,在安装的过程中,预设就都会是C:\Program Files ,而不会有因为在x64的OS中,程式的Path会变成C:\Program Files (x86)哦!

[Tool]利用Advanced Installer建立x86/x64在一起的安装程式

参考资料

How do I create a package that will be installed like a 64-bit package on 64-bit platforms and as 32-bit package on 32-bit platforms ?