What is the best way to update an MSI installation over the internet?
ClickOnce doesn't support MSIs.
I need the update to occur automatically over the internet, in the same manner as Windows updates occur.
Ideally, I would want my application to automatically detect that an update is available and download it and install it.
Answers should only deal with MSIs installations. I don't mind if there needs to be a Windows Service installed to monitor for updates.
Here's what I've done for a customer recently:
The UI is running as the logged on User.
The service is running as System. The service checks for content and downloads it to a temp directory. It then advertises the MSI using the /JM command. The installer can now be installed by the non-priviledged user.
The service sends an IPC message to the application saying that it's time to install. The application kicks off the installer passing it a flag that indicates to restart the application. The application the quits releasing the locked files.
At the end of the installer the flag causes the installer to relaunch the application.
Also take a look at the wuw4 library. It helps in creating a lot of this solution.
This is a complex pattern but works very well. I own a company that can assist you in making this solution. :)
You can use the msiexec utility. Here you can find an example.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With