就像在[Icons]
部分條目的參數Name
中指定此路徑一樣簡單。您當前的腳本創建像MyAppPublisher\MyAppName
一個快捷方式,這個人會做你的需要:
#define MyAppName "MyAppName"
#define MyAppExeName "MyProg.exe"
#define MyAppPublisher "MyAppPublisher"
[Setup]
AppName={#MyAppName}
AppVersion=1.5
DefaultDirName={pf}\My Program
DefaultGroupName={#MyAppPublisher}
OutputDir=userdocs:Inno Setup Examples Output
[Files]
Source: "{#MyAppExeName}"; DestDir: "{app}"
[Icons]
; notice the full path to the created shortcut, {group} is taken from the Select
; Start Menu Folder page edit box (if shown), which is by default taken from the
; DefaultGroupName directive value; this start menu folder path is then followed
; by the tail of the shortcut path
Name: "{group}\{#MyAppName}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
你描述的行爲很奇怪。您當前的腳本必須創建了「MyAppPublisher \ MyAppName」,而不是「MyAppName \ MyAppName」快捷方式。確保您正在運行正確的設置(如果您有多個InnoSetup IDE打開,例如),並且您已經在運行設置之前正確地重新編譯腳本。 – TLama 2013-02-21 13:54:57