Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninstalling a ClickOnce application silently

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.

like image 272
Josef Van Zyl Avatar asked Feb 14 '11 12:02

Josef Van Zyl


People also ask

Where are ClickOnce applications stored?

Every ClickOnce application installed on a local computer has a data directory, stored in the user's Documents and Settings folder.

Does ClickOnce require admin rights?

Windows Installer deployment requires administrative permissions and allows only limited user installation; ClickOnce deployment enables non-administrative users to install and grants only those Code Access Security permissions necessary for the application.

What is .NET ClickOnce?

ClickOnce is a component of Microsoft . NET Framework 2.0 and later, and supports deploying applications made with Windows Forms or Windows Presentation Foundation. It is similar to Java Web Start for the Java Platform or Zero Install for Linux.


1 Answers

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.

like image 108
Christian Lang Avatar answered Sep 19 '22 09:09

Christian Lang