Inno Setup的默认安装文件夹的变化 [英] Inno Setup default install folder change

查看:1357
本文介绍了Inno Setup的默认安装文件夹的变化的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我每次编译我的安装程序默认安装目录为C:\ Program Files文件\企业\产品,我似乎并没有能够改变它。下面是我下的安装:

Every time I compile my installer the default installation directory is C:\Program Files\Company\Product and I don't seem to be able to change it. Here's what I got under Setup:

[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应该规定默认的安装文件夹。但事实并非如此。

Based on the documentations, DefaultDirName should dictate the default install folder. But it doesn't.

我在特定情况下是这样的,我想设置默认安装在x64机器的文件夹C:\ Program Files文件,但安装程序将始终选择程序文件(x86)不管我放在DefaultDirName

My case in particular is that, I want to set the default install folder on x64 machines to C:\Program Files, but the installer always picks Program Files (x86) no matter what I put in the DefaultDirName.

推荐答案

最后一次选择的安装文件夹中有前的precedence DefaultDirName 指令值,如果<一个href="http://jrsoftware.org/ishelp/topic_setup_use$p$pviousappdir.htm"><$c$c>Use$p$pviousAppDir指令设置为,这是在默认情况下。如果要强制由指定的目录 DefaultDirName 是选择,关闭<一href="http://jrsoftware.org/ishelp/topic_setup_use$p$pviousappdir.htm"><$c$c>Use$p$pviousAppDir指令。

The last selected installation folder has the precedence before the DefaultDirName directive value if the UsePreviousAppDir directive is set to yes, which is by default. If you want to force the directory specified by the DefaultDirName to be selected, turn off the UsePreviousAppDir directive.

如果你想保持与最后一个目录的功能,只是克服这种为您的测试,只需卸载previous安装运行新的内置安装前。

If you want to keep the functionality with the last directory, and just overcome this for your testing, simply uninstall the previous installation before you run the new built setup.

这篇关于Inno Setup的默认安装文件夹的变化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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