• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 536
  • Last Modified:

invoking another MSI from existing MSI

I have two MSI's. After the first MSI is installed, i should check for a
environment variable and depending on its value, should be able to kick off
the second MSI (i can wrap the second msi into an exe if needed)
Is this possible using Visual Studio Setup and deployment project? If so,
can you explain me the procedure to implement.

Thanks in advance.
0
vizagboy
Asked:
vizagboy
  • 2
  • 2
1 Solution
 
Vadim RappCommented:
Create vbscript file that checks environment variable and runs msiexec /i install2.msi, and add it as custom action to the commit phase.
0
 
vizagboyAuthor Commented:
what do you suggestion of this....create a exe for the msi, add the exe to the msi, put some code in the custom action which checks for environment variable and add a Condition to the exe custom action to execute or not.
0
 
vizagboyAuthor Commented:
There was a typo in the above comment from me..it should be

what do you suggest of this....create a exe for the msi, add the exe to the commit custom action, put some code in the custom action which checks for environment variable and add a Condition to the exe custom action to execute or not.
0
 
Vadim RappCommented:
> create a exe for the msi

or vbs

> put some code in the custom action which checks for environment variable

easier to do it right in the vbs or the exe. http://msdn.microsoft.com/en-us/library/fd7hxfdd(VS.85).aspx

if WScript.CreateObject("WScript.Shell").Environment("SYSTEM")("MYVARIABLE") = "MYVALUE" then wshshell.run "msiexec /i install2.msi"

0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now