Page 1 of 1

Cycle through registry keys and uninstall matching ClickOnce

Posted: Tue Jul 10, 2012 6:32 am
by tofutim
I would like to cycle through the HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Uninstall until I locate
ClickOnce shortcut filenames that look like "myApp*" (could be "myApp", "myApp 2.0", "myApp 2.3", etc.). Then I would like to read the UninstallString

rundll32.exe dfshim.dll,ShArpMaintain textWcx.application, Culture=neutral, PublicKeyToken=53c8a151dd9e6a61, processorArchitecture=msil

and uninstall the old app. It looks like I should do this near the Install Application Pre-Reqs near

~InstallAware Clipboard Data~
~Compiler Variable If~
~{4F6B74D8-5F5D-4C81-BB2C-EAE24B0A3A4A}~
~BUILDMODE~
~0~
~PATCH~
~TRUE~

Any tips on how to do this, as well as to silently uninstall the clickonce app would be much appreciated.

Re: Cycle through registry keys and uninstall matching Click

Posted: Tue Jul 10, 2012 12:00 pm
by FrancescoT
Dear User,

There is a plug in that enumerates subkeys of a registry key, or values of a key.
I'm not quite sure if the plugin is still maintained by the author and if this still works with last IA releases.
http://www.installaware.com/forum/viewtopic.php?f=3&t=659

Alternatively, you could create an exe or a dll that does it.

The uninstall should be executed inside [DEFINE REGION: Install Application Pre-Requisites]
I suppose (honestly I am not familiar with ClickOnce) that it could be done using Run Program command and probably, setting "Hide Program Window" it will be done silently.

Regards