I'm fairly new to c# and this forum in general but as far as I'm concerned, I haven't seen any question like mine that will solve my problem.
I'm calling the method Process.WaitForExit()
to wait until an installation file finishes to install. However, the method seems to consider the UAC as the 'process' and activates after I click OK on the UAC. Is there a better way to wait for an installation process to finish before the code proceeds? Or am I doing it wrong? Disabling the UAC manually (if that's possible) is a no go unless it's done programmatically as well.
Here's the part of the code:
Edit: proper calling of process
Process netInstall = Process.Start(filePath + "\\Installer.exe");
netInstall.WaitForExit();
Console.WriteLine("Installation Finished!");
Edit 2: Would it help if I say I'm installing MySQL Server 5.6? It seems that, besides the Security Warning, it pops up and close some windows before it starts too. Regards.