Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VDPROJ auto upgrading vs. uninstall/reinstall

I've seen a confusing behavior regarding the MSI files generated by a VDPROJ file. If I build my MSI in Visual Studio and then right-click and pick "Install" from within Visual Studio, it will automagically uninstall any version that is already installed and then install the new MSI.

However, if take the generated MSI and run it directly it will complain if a previous version is already installed. I have to uninstall it explicitly (in Add/Remove Programs) first.

What's the deal? Is there a command-line argument that Visual Studio executes the MSI with?

like image 925
dviljoen Avatar asked Nov 21 '08 19:11

dviljoen


1 Answers

Yes Visual Stuido will be passing the REINSTALLMODE and the REINSTALL properties to the windows installer when it runs your install

something like:

msiexec /i your.msi REINSTALLMODE=vomus REINSTALL=ALL

Check the MSDN documents linked above to see what these options are doing

Edit:
Now I come to think of it. Studio may also just be uninstalling your application first by using the /x command line arg

msiexec /x <package> or <product code>

Maybe someone else can confirm which is being used?

like image 70
Jamie Avatar answered Jan 16 '23 03:01

Jamie