0

Hello I have question regrading sequentially run multiple ".msi" files.

I would like to make install software which programmatically and sequentially run .msi files

For example,

  1. Software run first.msi file
  2. User install first.msi file which some clicking event
  3. When user is done with installing first.msi file, first.msi file closes
  4. Software recognizes that first.msi installing was done such as closing first.msi application
  5. Software run Second.msi file and repeat from step two

I was searching

System.Process.Start - running msi problem

and

http://www.vbforums.com/showthread.php?532523-Launching-and-MSI-file-with-VB-NET

however, i can't find the way to check that ".msi" file are done with installing and then run second.msi file.

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Eric
  • 1
  • 1
  • 3
  • Without having tested, my first thought is that you should call `WaitForExit` or handle the `Exited` event of the `Process` object each time before starting the next. That doesn't always work, because the `Process` object you have access to doesn't always correspond to the process doing the work. It's the first thing to try though. – jmcilhinney Oct 10 '19 at 00:09
  • 1
    What is the scenario? Why not just use a batch file to install in sequence if that is all you need? Then it is just a simple msiexec.exe command - one after the other. – Stein Åsmul Oct 10 '19 at 00:25
  • If you aren't trying to create your own installer app as a product, and just need to package up apps to install together, try Inno Setup for the installer. It's easy to use, and does just what you are asking. – HardCode Oct 10 '19 at 19:58
  • Do you really want the installer to repeat the installation over and over non-stop? Or just install a set of apps one after the other, one time each? – HardCode Oct 10 '19 at 19:58
  • @SteinÅsmul i can apply idea to bat file. However, I don't know how to catch the moment that done with installing .msi file because user needs to click ok and do some of actions to install .msi file – Eric Oct 10 '19 at 20:54
  • @HardCode is there any .NET installer app that you can suggest ? thanks! – Eric Oct 10 '19 at 20:55
  • @HardCode what I want to do it run install VB.NET or C# app. this app run first.msi then user click ok and set some of action to install first.msi. When first.msi installing is done then VB.NET install app execute second.msi. How can we know whether first.msi installing is done or not ? – Eric Oct 10 '19 at 20:58
  • In a rush, you can install via DTF, a .NET wrapper for the Win32 MSI API functions. [Have a look here](https://stackoverflow.com/a/17535555/129130). DTF is included in the [WiX installation](https://stackoverflow.com/questions/25004226/msi-vs-nuget-packages-which-are-is-better-for-continuous-delivery/25005864#25005864). And here is: [on batch installation](https://stackoverflow.com/a/53436779/129130). More later. You can always [pillage github.com for samples](https://github.com/search?q=Microsoft.Deployment.WindowsInstaller+extension%3Acs+configureproduct&type=Code). – Stein Åsmul Oct 11 '19 at 00:06
  • [One more link on customizing MSI installations](https://stackoverflow.com/a/58232330/129130). – Stein Åsmul Oct 11 '19 at 00:13
  • @Eric Inno Setup will do this for you. You should look in to it. Once I got familiar with it, I never looked at the .MSI setup again. – HardCode Oct 15 '19 at 14:06

0 Answers0