开始菜单文件夹作为子目录 - Inno Setup

ogg*_*ter 5 inno-setup

我想在开始菜单中为我的程序添加一个快捷方式,如下所示:

MyAppPublisher\MyAppName\MyAppName
Run Code Online (Sandbox Code Playgroud)

我的脚本中有这个:

DefaultGroupName={#MyAppPublisher}
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Run Code Online (Sandbox Code Playgroud)

但是开始菜单文件夹总是:

MyAppName\MyAppName
Run Code Online (Sandbox Code Playgroud)

有任何想法吗?

TLa*_*ama 5

就像Name[Icons]部分条目的参数中指定此路径一样简单。您当前的脚本创建了一个快捷方式,例如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}"
Run Code Online (Sandbox Code Playgroud)