Uninstalling a ClickOnce application silently

Josef Van Zyl picture Josef Van Zyl · Feb 14, 2011 · Viewed 24.4k times · Source

We have an production application that is deployed using Visual Studio's built-in ClickOnce deployment tool. I am writing a batch file to uninstall the application:

rundll32.exe dfshim.dll,ShArpMaintain AppName.application, Culture=neutral,
PublicKeyToken=XXXXXX, processorArchitecture=x86

The batch file works and the application's uninstall is called. However, I'm looking to do this silently. I have tried /Q /q /S /s /Silent but with no joy.

How can I do this?


I do not want to hide the batch file window. Only the ClickOnce window.

Answer

Christian Lang picture Christian Lang · May 7, 2013

Since there seemed to be no good solution for this, I implemented a new ClickOnce uninstaller. It can be called via command-line, from .NET, or integrated into a WiX setup project as custom action.

https://github.com/6wunderkinder/Wunder.ClickOnceUninstaller

We used this for our Wunderlist 2.1 release, where we switched from ClickOnce to a Windows Installer package. It's integrated into the installation process and completely transparent to the user.