Uninstall previous version

Add-in Express™ Support Service
That's what is more important than anything else

Uninstall previous version
Version installed with VDProj installer doesn't get uninstalled by Wix installer 
Brad Clements




Posts: 72
Joined: 2008-05-01
Remvoing the InstallScope attribute fixed the problem where the new installer was defaulting to per-machine. But the other problem still exists: the new installer gives an insufficient privileges error message instead of uninstalling the previous version.
Posted 10 Jun, 2014 10:37:43 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Brad,

Remvoing the InstallScope attribute fixed the problem where the new installer was defaulting to per-machine

What do you mean? I noticed in your vdproj setup that it is 'per user' by default. When you remove 'InstallScope', no default value is set in the wix project and the installer should request the elevation (if needed) at the runtime.

When the old setup is uninstalled from the 'Program Files' folder, you should be prompted with the UAC popup. Do you see the UAC popup window?
Posted 10 Jun, 2014 11:52:37 Top
Brad Clements




Posts: 72
Joined: 2008-05-01
The new installer used to default per-machine even though the VDProj setup defaulted per-user. Removing the InstallScope attribute resolved that problem; now the new installer defaults to per-user just like the old installer.

The new installer is displaying the UAC popup in all cases.

If I manually uninstall the old version prior to installing the new version then I don't encounter any problems. The problems only occur when the new version is installed over the old version.

If the old version was installed per-user and the new version is installed per-user I get the error saying it has insufficient privileges. This comes up after the UAC prompt comes up and I agree to it.

If the old version was installed per-machine and the new version is installed per-machine I get the error saying it has insufficient privileges. This comes up after I agree to the UAC prompt.

If the old version was installed per-machine and the new version is installed per-user I get the error saying it has insufficient privileges. You noted earlier that I should use a custom action in this case to inform the user to manually uninstall the older version before installing the new version. I'm still figuring out how to do that.
Posted 10 Jun, 2014 17:28:26 Top
Brad Clements




Posts: 72
Joined: 2008-05-01
It didn't make sense to me that I was getting this insufficient privileges error after a UAC prompt. I did a little Googling and learned that this error message is often shown even when the actual error has nothing to do with privileges. I tried running my new installer with logging enabled, and I found that the following error is logged just before the insufficient privileges error is shown:

DEBUG: Error 2835:  The control ErrorIcon was not found on dialog ErrorDialog
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2835. The arguments are: ErrorIcon, ErrorDialog, 
Error 1303. The installer has insufficient privileges to access this directory: C:Program Files (x86)NetDocumentsEMS.  The installation cannot continue.  Log on as administrator or contact your system administrator.
MSI (s) (DC:10) [09:18:47:799]: Product: NetDocuments EMS Folders -- Error 1303. The installer has insufficient privileges to access this directory: C:Program Files (x86)NetDocumentsEMS.  The installation cannot continue.  Log on as administrator or contact your system administrator.


Does this indicate a problem with the ErrorDialog generated by VDProj Converter?
Posted 11 Jun, 2014 10:24:04 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Brad,

You get the error after the old version is uninstalled and the new installer tries to create the target installation folder under 'Program Files'. I resolved this issue just removing 'InstallScope' in a test project. Please download the project here: http://www.add-in-express.com/tmp/upgrade_testLib.zip

The project contains two setups: Setup-vdproj.msi(old .vdproj setup v1.0.0) and Setup-wixproj.msi (new .wixproj setup v1.0.1).
Does it work on your PC?
Posted 11 Jun, 2014 13:03:27 Top
Brad Clements




Posts: 72
Joined: 2008-05-01
Your setup example works correctly on my PC.

But I removed the InstallScope from my .wxs file after you suggested doing so on the 9th. That has not resolved the problem with my installer.

I noticed that at the point where my installer displays the message about insufficient privileges, if I try to navigate to the destination folder in Windows Explorer it tells me "Access is denied". I get the same message if I try to cd to this folder in an elevated command prompt window. After I close the dialog displaying the insufficient privileges message, the target folder gets deleted. So there's an interim step where the ACL of this folder has been changed to allow no access. I think if we could figure out how to stop the installer from doing that, we could resolve this problem.
Posted 11 Jun, 2014 14:45:59 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
Hi Brad,

I noticed that at the point where my installer displays the message about insufficient privileges, if I try to navigate to the destination folder in Windows Explorer it tells me "Access is denied"

It happens because the installation folder doesn't exists and Windows Explorer has not refreshed the 'Program Files' folder yet.

I think that you get 'Access is denied' because you register secman.dll for COM. I guess that the old installation was run 'As Administrator'. If so, please try to run setup.exe file of new installer in 'As Administrator' mode.
Posted 13 Jun, 2014 07:23:02 Top