Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I completely uninstall a ClickOnce application from my computer?

While experimenting with trying to publish both a Foo and Foo Beta version of my application via ClickOnce I managed to clobber the existing and previously-working-fine Foo 1.0.0 install (replacing it with Foo Beta 1.0.5, which does not work) due to using the same GUID, assembly name, product name or something.

OK, honest mistake. In an attempt to revert this I then uninstalled Foo Beta using the Windows 7 add/remove programs.

My computer is now in a state where no instance of Foo shows up in Windows 7 Add/Remove programs. However, Foo Beta is still shown as installed. In addition, I am unable to re-install Foo 1.0.0, because it thinks that a newer version of the program (Foo Beta 1.0.5) already exists on my computer - instead I get the `Unable to install because a newer version of this product is already installed' message.

How can I get my computer to a state where neither Foo nor Foo Beta have ever been installed on it, so that I can then go and re-install Foo?

So far I have read Stack Overflow questions Uninstall ClickOnce clients and How can I remove all traces of a ClickOnce application from a customer's computer? and tried:

  1. Deleting all the relevant foo.exe directories under %USERPROFILE%/
  2. Running mage.exe -cc
  3. Editing the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall and removing the entry for my Foo program.

When I run the installer, I still get the error. Where is it finding traces of my program from? And for future reference, where is this documented?

like image 827
fostandy Avatar asked Jun 05 '12 11:06

fostandy


3 Answers

You can try using this command to clear the ClickOnce cache:

rundll32 dfshim CleanOnlineAppCache
like image 83
eoghank Avatar answered Oct 26 '22 21:10

eoghank


DO IT THE OLD WAY! :D

use the "old" control panel to remove the Click Once app and re-install it. Do not use the "new " Windows Ten/2016 interface

EG this is GOOD and will remove Click Once:

Start => type
Control Panel\Programs\Programs and Features

enter image description here

EG this is BAD and will get you in a circular hell if you use it to remove Click Once:

Start => Run =>
ms-settings:

enter image description here

like image 43
Mr Heelis Avatar answered Oct 26 '22 23:10

Mr Heelis


1) Run rundll32 %SystemRoot%\system32\dfshim.dll CleanOnlineAppCache

2) You might have to manually delete the ClickOnce deployment folders,

  • On Windows Vista or higher, this will be the %LocalAppData%\Apps\2.0 directory.
  • On Windows XP this will be the %USERPROFILE%\Local Settings\Apps\2.0 directory.

3) You might also have to logout and login back

like image 26
Nemo Avatar answered Oct 26 '22 21:10

Nemo