Search code examples
.netvisual-studioinstallshield

Run application after silent install using command line in Installshield


I created a setup.exe for my project using Install-shield Limited for visual studio 2015. I was able to run it silently with this command line:

Setup.exe /s /v/qb

It works fine. Now I want to run the installed application after completing the installation. How can I do it?

(I prefer to add something to the above command-line to do this).

EDIT: There is another question like mine. That question wants to run application after installation too. but my question is to run after silent installation (using command-line) and the other question is to run after a normal installation by user. I tried the answers of that question before and they don't work in my case.


Solution

  • Thank you to @Michael-Urman I found the answer:

    I should use the batch command executing. You can execute more than one command by using & symbol (or &&).

    But I need to run setup first completely then run the program. So I used start /wait command.

    The final command was this:

    start /wait setup.exe /w /s /v/qb && "C:\Program Files (x86)\Company\Product\program.exe"
    

    /wait suspends cmd until setup finishes then runs next command.

    /w keeps setup.exe alive until msi package installs successfully.

    /s installs the program silently and /v passes arguments to msi installer (see documentation).

    /qb shows basic UI of msi installer. (see documentation).

    && (in comparison with &) runs 2nd command if 1st command runs successfully.