How to make msi rewrite program if previous version exists?

I am using Visual Studio 2010, I am working on a Windows application and, when I try to do an automatic update for it, I ran into a serious problem.

When a program finds a new version and tries to install it, it cannot be caused by two reasons:

1 - the application exists in my program files. so a window appears enter image description here

2 - the application is already open " the form that performed the update process ".

The problem has nothing to do with the version number.

This is about the existence of the program and the possibility of installing a new version, although the previous version is open.

+4
source share
3 answers

To enable the automatic core update mechanism, you need to increase ProductVersion and modify ProductCode . This is done through the "Project Properties" panel.

You can read more about updates here: http://msdn.microsoft.com/en-us/library/windows/desktop/aa370579(v=vs.85).aspx

+3
source

Cosmin is correct, but if you want more specific steps, try the steps described in this other post:

+2
source

If you want to upgrade an existing program, this is called a patch, so you do not need to use MSI, which is the installer, instead look at MSP instead of MSI.

http://msdn.microsoft.com/en-us/library/windows/desktop/aa370578 (v = vs .85) .aspx

For us, we used the loading screen and connected to the SQL table, which contains a list of the corresponding .DLL in binary format. Then I use reflection to check the version number compared to the one in the start directory, and if it is newer, then replace it. This is just another idea, but if you are looking for an update to existing software with some kind of package, check out MSP.

0
source

All Articles