Run application after successful install
How to make check box that allow user to 开发者_StackOverflow社区run application after installation?
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
Check the postinstall
flag in the [Run]
section, see the documentation at https://jrsoftware.org/ishelp/topic_runsection.htm#postinstall
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
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
精彩评论