0

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.

Community
  • 1
  • 1
Mahdi Ataollahi
  • 4,544
  • 4
  • 30
  • 38
  • Possible duplicate of [Run solution exe after installation using installshield](http://stackoverflow.com/questions/10698145/run-solution-exe-after-installation-using-installshield) – Roman Marusyk Aug 12 '16 at 08:58
  • @MegaTron No. it's not. I want to run installed app after silent installation (using command-line). The question you mentioned is about installing by user not by command-line. – Mahdi Ataollahi Aug 12 '16 at 12:41
  • 1
    Are you trying to modify the installation project to enable this, or to do it at the command prompt? If the latter, the tags are all wrong, and something like `setup.exe /s /v/qb & "C:\Program Files (x86)\Company\Product\program.exe"` should do the trick. – Michael Urman Aug 12 '16 at 13:10

1 Answers1

0

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.

Mahdi Ataollahi
  • 4,544
  • 4
  • 30
  • 38