Label Cloud

Tuesday, October 23, 2007

Removing (Uninstalling) ClickOnce Web deployed application from Application Cache

I keep looking up a command to completely uninstall a ClickOnce application form the Application Cache. If the application is deployed using "Run from the Web" method, it is not available in the "Add/Remove Programs" control panel. To remove it, you have to clear the application cache. An important note: this will remove ALL applications from the cache. That is usually not a problem, since the next time you run them, they  will be downloaded.

To clear the cache, run the command "mage.exe -cc" from the Visual Studio command prompt.

Mage is using an API call to accomplish this functionality

CleanOnlineAppCache from Dfshim.dll

You can achieve the same functionality by using a command line tool RunDll32.exe

rundll32 %windir%\system32\dfshim.dll
CleanOnlineAppCache

Or create a batch file with the above command

Technorati Tags: , , ,


Share/Save/Bookmark

1 comment:

densom said...

Thank you!!! It took me over an hour to find this answer. Appreciate the post!