就像在[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