簡體   English   中英

Inno Setup默認安裝文件夾更改

[英]Inno Setup default install folder change

每次我編譯我的安裝程序時,默認安裝目錄是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)。

如果UsePreviousAppDir指令設置為yes (默認情況下),則最后選擇的安裝文件夾在DefaultDirName指令值之前具有優先級。 如果要強制選擇DefaultDirName指定的目錄,請關閉UsePreviousAppDir指令。

如果要將功能保留在最后一個目錄中,並且只是為了測試而克服這個問題,只需在運行新構建的安裝程序之前卸載以前的安裝。

只需在您的iss文件中添加“UsePreviousAppDir = no”:

[設定]

...

UsePreviousAppDir =無

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM