运行 安装后的应用程序(静默安装程序)

Run application after install(silent installer)

我想在安装后立即 运行 我的应用程序,我理解代码如下:

!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
!insertmacro MUI_PAGE_FINISH

Section
CreateShortcut "$DESKTOP\HelloWorldShortcut.lnk" "$INSTDIR\Hello World.exe" "dev03 3" 
SectionEnd    

Function LaunchLink
ExecShell "" "$DESKTOP\HelloWorldShortcut.lnk"
FunctionEnd

问题是我的安装程序是静默安装程序,但上面的代码为其添加了一个页面。

有没有办法在安装后立即使用静默安装程序 运行 应用程序?

静默安装程序可以 运行 将应用程序作为最后一部分的最后一步。静默安装程序启动应用程序是否是一个好主意是你应该考虑的事情,我个人会说不...

Section
SetOutPath $InstDir
File "MyApp.exe"
...

IfSilent "" +2 ; If the installer is always silent then you don't need this check
ExecShell "" "$InstDir\MyApp.exe"
SectionEnd