Can't uninstall ClickOnce in client environment

Can't uninstall ClickOnce in client environment

Curious issue with ClickOnce uninstalls in a client’s environment.

PermissionsClickOnce

The initial install and subsequent updates work correctly, but it’s not possible to uninstall the application using Programs and Features.

Manually running the UninstallString from HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall also results in an Access Denied error, even when running as an Administrator.

UninstallString.jpg

The issue is occurring on all the systems we’ve tested within their network (five in total so far) and spans multiple versions of Windows (Server 2008, Windows7 and Windows10).. Uninstalling in a test environment not on their network succeeds.

The issue is not limited to the recently redeployed application, ClickOnce software that’s been installed for a few years also results in the same failure. This issue did not exist two weeks ago when a different application required updates.

Manually uninstalling by deleting the associated directories in %USERPROFILE%\AppData\Local\Apps\2.0 and deleting the uninstall entry under HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall does effectively remove the application, but beware that any shortcuts will have to be manually removed.

Also note that using this method requires the version number to be incremented prior to reinstalling or the installation will fail with The referenced assembly is not installed on your system.

The issue has not yet been resolved, I’ll update the article as I make progress on correcting this issue.

Unicode in Windows Usernames

Unicode in Windows Usernames

How Fault Code and Offset Work (Application Crash)

How Fault Code and Offset Work (Application Crash)