Different .NET app install behavior between modal and silent insta

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two releases of a .NET app that has a setup/deployment project that
generates the installation MSI file. In the second release of the app, I set
RemovePreviousVersions to True and DetectNewerInstalledVersion to False in
the deployment project properties.

Scenario 1:
If I install v1.0.0 of my app (answer the dialogs) and then install v1.1.0
the same way, v1.0.0 is successfull uninstalled. This is good.

Scenario 2:
If I install v1.0.0 (answer the dialogs) and then install v1.1.0 silently
via msiexec (/qn or /quiet parameter options), then both apps will co-exist
on the system; v1.1.0 does not uninstall v1.0.0. This is very bad!

Scenario 3:
If I install both v1.0.0 and v1.1.0 silently with msiexec, v1.1.0 is
successfully uninstalled by v1.1.0. This is good.

Why does scenario 2 fail?

Platform is WinXP w/Windows Installer. V 3.01.4000.1823 and VS 2k3

-Matt
 
I'm answering my own question here....

The fix for this problem is to use the ALLUSERS=1 parameter on the
command-line when performing the silent install as follows:

msiexec.exe /qn/ i myapp.msi ALLUSERS=1

Even if FolderForm_AllUsers property is set to "ALL" instead of the default
"ME" value in your MSI file, the ALLUSERS parameter must be set to 1 when
performing a silent install. Apparently, when installing an MSI by answering
the dialogs, ALLUSERS gets set appropropriately when you select the
"Everyone" (per machine install.) However, the FolderForm_AllUsers property
has no affect during silent install, which is why you have to set ALLUSERS
property as a parameter to your silent install. Otherwise, your silent
install will install your app as a per user install and caanot remove the
previous product as in scenario 2 in my problem example.

-Matt
 
Back
Top