Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to update an MSI installation over the internet?

Tags:

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.

like image 653
CJ7 Avatar asked Feb 07 '12 10:02

CJ7


2 Answers

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. :)

like image 138
Christopher Painter Avatar answered Nov 24 '22 01:11

Christopher Painter


You can use the msiexec utility. Here you can find an example.

like image 37
Ciprian Avatar answered Nov 23 '22 23:11

Ciprian