How to make check box that allow user to run application after installation?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Check the postinstall
flag in the [Run]
section, see the documentation at https://jrsoftware.org/ishelp/topic_runsection.htm#postinstall
回答2:
There you go:
under [Run]
:
Filename: {app}\{cm:AppName}.exe; Description: {cm:LaunchProgram,{cm:AppName}}; Flags: nowait postinstall skipifsilent
under [CustomMessages]
:
AppName=mySoftwaresNiceName
LaunchProgram=Start mySoftware after finishing installation
回答3:
Add Filename to Run Section with Flag postinstall.
Example for Copy&Paste:
[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
回答4:
To make the checkbox, create a task:
[Tasks]
Name: StartAfterInstall; Description: Run application after install
and bind it to "run" action:
[Run]
Filename: {app}\{#exe}; Flags: shellexec skipifsilent nowait; Tasks: StartAfterInstall
where {#exe} is the name of exe-file
标签:
inno-setup