Good day!
I’m working on installer, which installs additional dependencies for my software using Process.Start.
foreach dependency:
var process = System.Diagnostics.Process.Start(processStartInfo);
process.WaitForExit();
The problem is when another msi installation is runned, WaitForExit hangs (and when I close this another msi installation, WaitForExit also exits).
I can’t use timeouts, because dependencies are different with very different installation time.
Is there any ways to handle this situation and correctly kill process (actually I want to know is dependency is installing or just hanging)?
Many thanks.
Solution: in my case the problem is solved by checking if ‘msiexec’ process is running.
The solution to my problem – check global mutex, created by msiexec. This is also a correct way to check if another msi installation is running.
Here is some details http://msdn.microsoft.com/en-us/library/aa372909(VS.85).aspx