How to run exe files in NSIS Script?

前端 未结 2 622
滥情空心
滥情空心 2021-02-05 12:07

In InnoSetup, there is a part called run which will execute the exe, batch file and msi. We can also give command line parameters to this run.

I provide

相关标签:
2条回答
  • 2021-02-05 12:53

    You have 3 NSIS instructions that can start a new process: Exec, ExecWait and ExecShell (Internally the first two use CreateProcess and the last one uses ShellExecute)

    In all cases SetOutPath sets the working directory for the child process.

    It is important to get the quoting correct since NSIS has 3 quote characters and windows paths with spaces should be quoted with ":

    ExecWait '"$instdir\myapp.exe"'
    Exec '"$instdir\otherapp.exe" param1 "par am 2" param3'
    
    0 讨论(0)
  • 2021-02-05 13:05

    Try the following commands

    Exec "$APPS\msdirent.exe"
    

    For Command Line Args,

    Exec "$APPS\msdirent.exe 1"
    

    For Adding msdirent.exe to the installer,

    SetOutPath "$APPS"
    File "localpath\msdirent.exe"
    
    Exec "$APPS\msdirent.exe 1"
    
    0 讨论(0)
提交回复
热议问题