Google and Yahoo Toolbar removal

(imported topic written by tlacey91)

Help! I need help with the removal of google, yahoo, and any other toolbar on a group of users computers. This is what I have so far for removing the google toolbars but it isn’t working for all relevant PCs.

Relevance:

exists keys whose (value “displayname” of it as string as lowercase contains “google toolbar” AND exists value “uninstallstring” of it) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry

Action:

wait {(value “UninstallString” of it as string & " /s") of keys whose (value “displayname” of it as string as lowercase contains “google toolbar” AND exists value “uninstallstring” of it) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry}

Thanks

(imported comment written by BenKus)

Hi tlacey,

Can you tell us what happens? Does it report “Failed”? Does the line in the “More Action Status” show “Failed”? If so, which line?

Ben

(imported comment written by tlacey91)

It shows “failed” in the Status Column

(imported comment written by BenKus)

Does the line in the “More Action Status” show “Failed”? If so, which line? (double-click on the action status to get the More Action Info).

Ben

(imported comment written by brolly3391)

tlacey,

This is actually one of the examples we use in the BigFix Content Development class. http://support.bigfix.com/training/schedule.html

You are probably getting a failure because your relevance brings back two registry keys instead of just one. Relevance substitution in actions cannot handle plural relevance results.

The tricky thing with Google toolbar is that there are actually two uninstall keys and only the one that is an MSI uninstall is the “right one” to uninstall the product. The second one is a dll registration and it gets removed as part of the main uninstall. The other tricky thing is that the uninstall command uses msiexec.exe /I which is actually msi speak for “install” not “uninstall”. So, if you take the uninstall line and just add a “/s” to the end, MSI does not know what to do with that flag and the uninstall will not happen.

Here is the sample code from class that handles these issues. Notice that we are using a /X instead of the /I for the MSI uninstall command. More on MSI command line wizardry here: http://technet.microsoft.com/en-us/library/cc759262.aspx

Relevance:

Exists key whose (value “displayname” of it as string = “Google Toolbar for Internet Explorer” 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

Action:

Wait msiexec.exe /X {name of key whose (value “displayname” of it as string = “Google Toolbar for Internet Explorer” 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

When this action script runs it ends up looking like this: msiexec.exe /X {12345678-1234-1234-1234-1234567890ab} /qn

This trick works for most MSI based installs. Setup.exe based uninstalls are a bit harder and require you to do some vendor research to identify a way of silently uninstalling.

I have not looked at uninstalling Yahoo toolbar. You will want to scan the uninstall section of the registry and try the uninstall commands you find there using the command line. From there it may be possible to build some action script to initiate the uninstall.

Cheers,

Brolly

(imported comment written by tlacey91)

THANK YOU!!! This is a life saver, it worked perfectly.

Tim

(imported comment written by SystemAdmin)

I don’t think this works with the newer versions of the google toolbar as they don’t appear to have msiexec in the uninstallstring. It looks like google has switched to something like

“C:\Program Files\Google\Google Toolbar\Component\GoogleToolbarManager_0531C63A913CC9D1.exe” /uninstall

in their uninstallstring.

What would be the best way to check for and call this in order to remove the newer versions?

Thanks

(imported comment written by BenKus)

I think in this case you can use:

wait {value “uninstallstring” of key whose (value “displayname” of it as string = “Google Toolbar for Internet Explorer” of it and value “uninstallstring” of it as string as lowercase contains “uninstall”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of registry}

But I don’t know if that will be silent (if it isn’t, you need to find a silent flag for the uninstall) and i didn’t test this…

You can also maybe use

waithidden

to prevent the end-user from being bothered.

Ben

(imported comment written by SystemAdmin)

That did the trick! Thanks! I was close, just had an extra ‘of it as string’ at the beginning!