VDPROJ auto upgrading vs. uninstall/reinstall
Asked Answered
N

1

9

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?

Nihhi answered 21/11, 2008 at 19:28 Comment(0)
K
9

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?

Knighthead answered 21/11, 2008 at 19:33 Comment(1)
Thanks. That's the answer I was looking for. (I love this site!)Nihhi

© 2022 - 2024 — McMap. All rights reserved.