注:
checkablealone "选中"意思
unchecked "非选中"意思
图标选择:IconFilename: "{app}\Images\SysIcon.ico"
#define MyAppName "LuoCore" #define MyAppVersion "1.5" #define MyAppPublisher "LuoCore" #define MyAppURL "https://www.luocore.com/" #define MyAppExeName "LuoCore.exe" #define MyAppAssocName MyAppName + "" #define MyAppAssocExt ".exe" #define MyAppAssocKey StringChange(MyAppAssocName, " ", "") + MyAppAssocExt [Setup] ; 注意:AppId 是应用程序唯一标识值。不要在安装程序中对其他应用程序使用相同的 AppId 值。 ;(要生成新的 GUID,请在 IDE 内单击“工具 | 生成 GUID)”。 AppId={{D58B98CC-LuoCore-123} AppName={#MyAppName} AppVersion={#MyAppVersion} AppPublisher={#MyAppPublisher} AppPublisherURL={#MyAppURL} AppSupportURL={#MyAppURL} AppUpdatesURL={#MyAppURL} DefaultDirName={autopf}\{#MyAppName} ChangesAssociations=yes DisableProgramGroupPage=yes ; 取消下列注释行,以在非管理员安装模式下运行(仅为当前用户安装。) ;PrivilegesRequired=lowest OutputDir=盘符:\路径\Inno Setup 6\编辑宏 OutputBaseFilename=LuoCore安装包名称_setup SetupIconFile=盘符:\路径\Inno Setup 6\编辑宏\LuoCore\Images\SysIcon.ico Compression=lzma SolidCompression=yes WizardStyle=modern [Languages] Name: "english"; MessagesFile: "compiler:Default.isl" Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl" Name: "chinesetraditional"; MessagesFile: "compiler:Languages\ChineseTraditional.isl" [Tasks] Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkablealone [Files] Source: "盘符:\路径\Inno Setup 6\编辑宏\LuoCore\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion Source: "盘符:\路径\Inno Setup 6\编辑宏\LuoCore\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs ; 注意: 在任何共享系统文件上不要使用 “Flags: ignoreversion” [Registry] Root: HKA; Subkey: "Software\Classes\{#MyAppAssocExt}\OpenWithProgids"; ValueType: string; ValueName: "{#MyAppAssocKey}"; ValueData: ""; Flags: uninsdeletevalue Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}"; ValueType: string; ValueName: ""; ValueData: "{#MyAppAssocName}"; Flags: uninsdeletekey Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\{#MyAppExeName},0" Root: HKA; Subkey: "Software\Classes\{#MyAppAssocKey}\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\{#MyAppExeName}"" ""%1""" Root: HKA; Subkey: "Software\Classes\Applications\{#MyAppExeName}\SupportedTypes"; ValueType: string; ValueName: ".myp"; ValueData: "" [Icons] Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\Images\SysIcon.ico" Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon;IconFilename: "{app}\Images\SysIcon.ico" [Run] Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
标签:LuoCore,C#,setup,MyAppName,程序安装,MyAppExeName,Flags,app,define From: https://www.cnblogs.com/LuoCore/p/17642356.html