Inno Setup 系列之安装、卸载时调用bat
需求
想在安装的时候调用install.bat,在卸载的时候调用uninstall.bat
解决
可以这样写 Inno Setup 的脚本:
[Setup]
; NOTE: The value of AppId uniquely identifies this application. ; Do not use the same AppId value in installers for other applications. ; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) AppId={{3FC1FD05-BEC7-430A-B7DB-F07155FDE93E} AppName={#MyAppName} AppVersion={#MyAppVersion}
[Types]
Name: "custom"; Description: "Custom installation"; Flags: iscustom
[Components]
Name: "XXXXXXX"; Description: "XXXXXXX"; Types: custom; Flags: fixed
[Files]
Source: "XXXXXXX.exe"; DestDir: "{app}"; Components: XXXXXXX
Source: "XXXXXXX.pdf"; DestDir: "{app}"; Components: XXXXXXX
Source: "XXXXXXX.ico"; DestDir: "{app}"; Components: XXXXXXX
Source: "install.bat"; DestDir: "{app}"; Components: SearchInOneStep
[Run]
Filename: "{app}\install.bat"; Description: "Install.bat"; Flags: nowait skipifdoesntexist
[UninstallRun]
Filename: "{pf}\XXXXXXX\uninstall.bat"; Flags: skipifdoesntexist
Inno Setup 中文帮助文档
https://download.csdn.net/download/qq_36190858/10836946
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】凌霞软件回馈社区,博客园 & 1Panel & Halo 联合会员上线
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步