Uninstalling Application Using Registry Key Information

Hi Foks, am running a test, using fixlet debugger, to uninstall application installed on the local computer, using the following action command. But, the debugger keeps reporting that there is an issue with the last session “CurrentVersion\Uninstall” of native registry} /qn"

waithidden msiexec.exe /X {parenthesized parts 1 of first matches (regex “({.*}})”) of (it as string) of value “UninstallString” of key whose(value “DisplayName” of it as string as lowercase contains “Zoom”) of keys whose(exists keys of it) of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of native registry} /qn

Folks, I think this one does the job.

Wait msiexec.exe /X {name of key whose (value “displayname” of it as string contains “Adobe Reader” of it and value “uninstallstring” of it as string as lowercase contains “msiexec”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry} /qn

Now, I would like to use the parameter feature to request this information, in advance. So, in the future, I don’t have to keep editing the task and just to enter the name of the product that needs to be removed.

Is there any more to the action script? Here is the link to action parameter query.

https://developer.bigfix.com/action-script/reference/flow-control/action-parameter-query.html

It should look something like that. I did all my editing in here, so it may need a little tweaking.

action parameter query "application" with description "Enter application name" with default "Adobe Reader"
Wait msiexec.exe /X {name of key whose (value “displayname” of it as string contains “{parameter "application"}” of it and value “uninstallstring” of it as string as lowercase contains “msiexec”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry} /qn

Thanks Jared. This is exactly what I was looking for.

1 Like

I’ve ran into an issue with dell bloatware before, the software would have the same key but different uninstall strings. Here is the parameter I used for that scenario. parameter "removeString"="{ value whose (name of it is "UninstallString") of key "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\{keyhere}}" of (x32 registries; x64 registries) }"

1 Like