Inno Setup 6安装包脚本模板(入门实例/简体中文)

Pascal, Delphi wes 4 周前 (2026-03-01) 7次浏览

Inno Setup 6 完整版中文极简模板,直接改路径就可以编译使用。

TOML
;====================基础信息修改区====================
#define AppName “
我的工具软件        ;软件名称
#define AppVersion “1.0”              ;
版本号
#define AppPublisher “
个人开发者      ;作者/公司
#define AppExe “main.exe”             ;
主程序文件名
;=====================================================

[Setup]
AppName={#AppName}
AppVersion={#AppVersion}
AppPublisher={#AppPublisher}
DefaultDirName={pf}\{#AppName}
DefaultGroupName={#AppName}
OutputDir=Output                    ;安装包输出文件夹
OutputBaseFilename={#AppName}_Setup ;
生成安装包文件名
Compression=lzma2/ultra-solid       ;
最高压缩,体积最小
SolidCompression=yes
PrivilegesRequired=admin            ;
管理员权限安装
ArchitecturesAllowed=x64 x86 arm64
ArchitecturesInstallIn64BitMode=x64 arm64
UnicodeYes=yes                      ;
支持中文不乱码

[Languages]
Name: “chinesesimplified”; MessagesFile:
“compiler:Languages\ChineseSimplified.isl”

[Files]
Source: “{#AppExe}”; DestDir: “{app}”; Flags:
ignoreversion recursesubdirs createallsubdirs
;如需打包整个文件夹:把上一行换成 Source: “*”; DestDir:
“{app}”; Flags: recursesubdirs

[Icons]
Name: “{commondesktop}\{#AppName}”; Filename:
“{app}\{#AppExe}”
Name: “{group}\{#AppName}”; Filename: “{app}\{#AppExe}”
Name: “{group}\卸载软件“; Filename:
“{uninstallexe}”

[UninstallDelete]
Type: dirifempty; Name: “{app}”

超简单使用步骤

1.      
把你的软件文件(main.exe 和所有依赖)和脚本放在同一个文件夹

2.      
修改顶部「基础信息修改区」的名称、版本、程序文件名;

3.      
用 Inno Setup 打开脚本,点击菜单栏「运行/编译」;

4.      
自动生成安装包到 Output 文件夹,纯净无捆绑。

附加实用参数

•         
静默全自动安装:安装包后缀加 /VERYSILENT

•         
最高压缩已开启,大软件也能压到很小

•         
自带简体中文界面、桌面快捷方式、完整卸载清理