本文介绍了开始菜单文件夹作为子目录-Inno Setup的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我要在开始菜单中向程序添加快捷方式,如下所示:
I want to add a shortcut to my program in the start menu as follows:
MyAppPublisher\MyAppName\MyAppName
我的脚本中有这个
DefaultGroupName={#MyAppPublisher}
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
但是开始菜单文件夹始终为:
But the start menu folder is always:
MyAppName\MyAppName
有什么想法吗?
推荐答案
就像在 [Icons]
部分.您当前的脚本会创建一个类似于MyAppPublisher\MyAppName
的快捷方式,该快捷方式将完成您需要的操作:
It's as easy as specifying this path in the Name
parameter of the entry in the [Icons]
section. Your current script creates a shortcut like MyAppPublisher\MyAppName
, this one will do what you need:
#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}"
这篇关于开始菜单文件夹作为子目录-Inno Setup的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!