Windows 10 Uninstall Fails (error 1721)

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

Windows 10 Uninstall Fails (error 1721)
 
Marc Bernier




Posts: 3
Joined: 2013-04-12
I have an Excel Add-in that uses a Wix (3.10) install script. The installation works fine for all versions of Windows. However, if a Windows 10 the user tries to remove the add-in through System | Apps & Features, it fails with "There is a problem with this Windows Installer package. A program required for this install to complete could not be run." Looking at the uninstall log, I see this:

Error 1721. There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor. Action: _BDF865EC_34B3_4B29_986C_98D6EC1A9807, location: C:WindowsInstallerMSI2FE4.tmp, command: /uninstall="C:UsersWindows10AppDataLocalmyCompanymyProductmyAddin.dll" /privileges=user


The action that it is balking at is this:

<CustomAction Id="_BDF865EC_34B3_4B29_986C_98D6EC1A9807" BinaryKey="adxregistrator_exe" Execute="deferred" ExeCommand='/uninstall="[TARGETDIR]$(var.myProject.TargetFileName)" /privileges=user' Impersonate="yes" />


However, if I re-run my installer and select 'Remove', it uninstalls fine. If I run the uninstall from a command line (using the msiexec command found in the registry entry for this product), it also uninstalls fine. If I use the 'traditional' Control Panel option Add/Remove Programs, it is okay as well.

Also:

- This only happens in Windows 10. Older versions of Windows are fine.
- I have replicated on several machines, including a fresh install.
- I have an older installer (a VS2010 Setup Project), the problem happens with that installer as well.
- I have tried with UAC at different elevations, no difference.
- I have tried changing the Impersonate setting to "no", no difference.
- I have tried changing the Execute setting, no difference.
- I have tried commands other than adxregistrator, no difference.

It seems to me that there is a problem with the new Windows Apps & Features app, but I have yet to find anything on the Microsoft forums. The only thing I have found is this:

http://blog.iswix.com/2015/08/dtf-bug-with-new-windows-10-apps-and.html

I realize that this technically is not an issue with Add-in Express (I'm currently blaming Microsoft), I suspect that a lot of Add-in Express users may run into it due to the way Office Add-ins are installed.
Posted 13 Nov, 2015 11:14:54 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Marc,

Please modify the installer so that uninstalling the add-in creates a log file in a location other than the default one, reinstall your add-in, try to uninstall it using System | Apps & Features and send me both log files. You can publish them here or send them to the support email address; see {Add-in Express installation folder}\readme.txt; in this case, make sure your email contains a link to this topic.

To find how to create a log file in a different location, see section Get details about add-in registration/unregistration, see the PDF file in the folder {Add-in Express}\Docs on your development PC.


Andrei Smolin
Add-in Express Team Leader
Posted 16 Nov, 2015 05:23:02 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Marc,

Thank you for the log files. I've reproduced the issue using a VDPROJ-based installer. We are looking into the issue.


Andrei Smolin
Add-in Express Team Leader
Posted 18 Nov, 2015 07:01:43 Top
Andrei Smolin


Add-in Express team


Posts: 18830
Joined: 2006-05-11
Hello Marc,

We think the issue belongs to Microsoft. It looks they start an installer with limited permissions so that it cannot run a custom action; in our tests, only unmanaged custom actions are affected.


Andrei Smolin
Add-in Express Team Leader
Posted 26 Nov, 2015 06:41:59 Top