【发布时间】:2011-04-15 14:21:06
【问题描述】:
如何制作允许用户在安装后运行应用程序的复选框?
【问题讨论】:
标签: inno-setup
如何制作允许用户在安装后运行应用程序的复选框?
【问题讨论】:
标签: inno-setup
检查[Run] 部分中的postinstall 标志,请参阅https://jrsoftware.org/ishelp/topic_runsection.htm#postinstall 的文档
【讨论】:
将文件名添加到带有标志 postinstall 的运行部分。
复制粘贴示例:
[Run]
// User selected... these files are shown for launch after everything is done
Filename: {app}\README.TXT; Description: View the README file; Flags: postinstall shellexec skipifsilent
Filename: {app}\APP.EXE; Description: Run Application; Flags: postinstall nowait skipifsilent unchecked
【讨论】:
要制作复选框,请创建一个任务:
[Tasks]
Name: StartAfterInstall; Description: Run application after install
并将其绑定到“运行”操作:
[Run]
Filename: {app}\{#exe}; Flags: shellexec skipifsilent nowait; Tasks: StartAfterInstall
其中 {#exe} 是 exe 文件的名称
【讨论】:
你去吧:
[Run]下:
Filename: {app}\{cm:AppName}.exe; Description: {cm:LaunchProgram,{cm:AppName}}; Flags: nowait postinstall skipifsilent
[CustomMessages]下:
AppName=mySoftwaresNiceName
LaunchProgram=Start mySoftware after finishing installation
【讨论】: