Run Windows Installer in background
-
Hello everyone! I'm not quite sure, if this is the correct message board for this thread, but i'm working with C++ so I posted this thread here. I've created an Win32 Application, which checks if the .net Framework is installed on the system. If not, the program will automatically start to install the .net Framework in the background. Is there any way to run a Windows Installer Package in the background (command line, etc.)?? For example I have myinstaller.msi or dotnetfx.exe! How can I solve my problem??? Thank you for helping me!
-
Hello everyone! I'm not quite sure, if this is the correct message board for this thread, but i'm working with C++ so I posted this thread here. I've created an Win32 Application, which checks if the .net Framework is installed on the system. If not, the program will automatically start to install the .net Framework in the background. Is there any way to run a Windows Installer Package in the background (command line, etc.)?? For example I have myinstaller.msi or dotnetfx.exe! How can I solve my problem??? Thank you for helping me!
You can execute the EXE file with CreatePRocess() and either wait for it to finish or not. You can run MSIEXEC to run MSI files. You can wait, or not, for the setup to finish. Now, I have not installed .NET so many times to know if it usually requires a reboot or not. If it usually requires a reboot, then you might as well launch its setup and exit, since the machine will probably have to be restarted anyway.
-
You can execute the EXE file with CreatePRocess() and either wait for it to finish or not. You can run MSIEXEC to run MSI files. You can wait, or not, for the setup to finish. Now, I have not installed .NET so many times to know if it usually requires a reboot or not. If it usually requires a reboot, then you might as well launch its setup and exit, since the machine will probably have to be restarted anyway.
Thank you for the tip! I understand the MSIEXEC. Blake Miller wrote: CreatePRocess() :confused::confused::confused: But that's the thing I don't understand. I'm just a newbie, so could you give me a few lines of code, please?!?! :-O
-
Thank you for the tip! I understand the MSIEXEC. Blake Miller wrote: CreatePRocess() :confused::confused::confused: But that's the thing I don't understand. I'm just a newbie, so could you give me a few lines of code, please?!?! :-O
Check out this article on starting another program from your current program: http://www.codeproject.com/threads/CreateProcessEx.asp You need to call CreateProcess to start the MSIEXEC program which will run the MSI file you use to install .NET