InnoSetup 设置快捷方式、菜单目录的名称显示

1. 先定义一个中文名称变量

#define MyAppChineseName "磁盘清理工具"

2.设置默认快捷试的目录名称与安装包输出名称

[Setup]

//设置默认文件夹的名称,默认文件夹名称与开始菜单文件夹名称、安装目录名称对应。

DefaultGroupName={#MyAppChineseName}

//设置输出路径和安装包名称

OutputDir=C:\Users\10167\Desktop
OutputBaseFilename={#MyAppChineseName}

3. 设置快捷方式名称

[Icons]

//设置开始菜单中快捷方式名称

Name: "{group}\{#MyAppChineseName}"; Filename: "{app}\{#MyAppName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppChineseName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppChineseName}}"; Filename: "{uninstallexe}"

//设置桌面快捷方式名称
Name: "{commondesktop}\{#MyAppChineseName}"; Filename: "{app}\{#MyAppName}"; Tasks: desktopicon

详细设置:

 1 ; Script generated by the Inno Setup Script Wizard.
 2 ; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
 3 
 4 #define MyAppName "CleanCacheTool"
 5 #define MyAppChineseName "磁盘清理工具"
 6 #define MyAppVersion "1.0"
 7 #define MyAppPublisher "Seewo"
 8 #define MyAppURL "http://www.seewo.com/"
 9 #define MyAppExeName "CleanCacheTool.exe"
10 
11 [Setup]
12 ; NOTE: The value of AppId uniquely identifies this application.
13 ; Do not use the same AppId value in installers for other applications.
14 ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
15 AppId={{9C358EFE-5602-4EDC-9A40-0FA85EEDD604}
16 AppName={#MyAppName}
17 AppVersion={#MyAppVersion}
18 ;AppVerName={#MyAppName} {#MyAppVersion}
19 AppPublisher={#MyAppPublisher}
20 AppPublisherURL={#MyAppURL}
21 AppSupportURL={#MyAppURL}
22 AppUpdatesURL={#MyAppURL}
23 DefaultDirName={pf}\{#MyAppName}
24 DefaultGroupName={#MyAppChineseName}
25 OutputDir=C:\Users\10167\Desktop
26 OutputBaseFilename={#MyAppChineseName}
27 SetupIconFile=F:\Gitlab\CleanCacheTool\CleanCacheTool\bitbug_favicon.ico
28 Compression=lzma
29 SolidCompression=yes
30 
31 [Languages]
32 Name: "english"; MessagesFile: "compiler:Default.isl"
33 
34 [Tasks]
35 Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
36 
37 [Files]
38 Source: "F:\Gitlab\CleanCacheTool\CleanCacheTool\bin\Debug\CleanCacheTool.exe"; DestDir: "{app}"; Flags: ignoreversion
39 Source: "F:\Gitlab\CleanCacheTool\CleanCacheTool\bin\Debug\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
40 ; NOTE: Don't use "Flags: ignoreversion" on any shared system files
41 
42 [Icons]
43 Name: "{group}\{#MyAppChineseName}"; Filename: "{app}\{#MyAppName}"
44 Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppChineseName}}"; Filename: "{#MyAppURL}"
45 Name: "{group}\{cm:UninstallProgram,{#MyAppChineseName}}"; Filename: "{uninstallexe}"
46 Name: "{commondesktop}\{#MyAppChineseName}"; Filename: "{app}\{#MyAppName}"; Tasks: desktopicon
47 
48 [Run]
49 ;Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
View Code

以下是截图:

安装目录

开始菜单显示

桌面快捷方式:

猜你喜欢

转载自www.cnblogs.com/kybs0/p/9891310.html