【发布时间】:2013-03-14 09:27:49
【问题描述】:
每次我编译我的安装程序时,默认安装目录是 C:\Program Files\Company\Product,我似乎无法更改它。这是我在设置下得到的:
[Setup]
AppName=MyProduct
AppVerName=MyProduct
AppPublisher=Company
DefaultDirName=C:\MyStuff\Company\MyProduct
DefaultGroupName=Company\MyProduct
UninstallDisplayIcon={app}\MyProduct.exe
UninstallDisplayName=MyProduct Uninstall
PrivilegesRequired=poweruser
OutputDir=userdocs:Inno Setup Examples Output
OutputBaseFilename=Setup
DisableDirPage=false
DisableProgramGroupPage=true
VersionInfoCompany=Company Inc
VersionInfoProductName=MyProduct
AllowUNCPath=false
根据文档,DefaultDirName 应该指定默认安装文件夹。但事实并非如此。
特别是我的情况是,我想将 x64 机器上的默认安装文件夹设置为 C:\Program Files,但无论我在 DefaultDirName 中输入什么,安装程序总是选择 Program Files (x86)。
【问题讨论】:
-
对于 x86 应用,
C:\Program Files (x86)` andC:\Program Files` 是同一个文件夹。 -
如果你有一个 64 位应用程序,那么你应该打开 64 位安装模式,然后它会做你想做的事。如果你有一个 32 位的应用程序,那么 Inno 已经在做正确的事情,并且试图强制它安装到 64 位的 Program Files 文件夹将是非常糟糕的。
标签: installation 64-bit inno-setup istool