Jump to content

Recommended Posts

Posted

Hi,

 

The ask toolbar seems to have sneaked itself onto our image. Does anyone have a script to uninstall it please? the ones i found on google dont seem to work.

 

Thanks

Posted

Assuming you have the latest version of the Ask Toolbar (v1.12.5.0), this command will remove it...

 

msiexec.exe /x {86D4B82A-ABED-442A-BE86-96357B70F4FE} /qn

  • Thanks 1
Posted
Assuming you have the latest version of the Ask Toolbar (v1.12.5.0), this command will remove it...

 

msiexec.exe /x {86D4B82A-ABED-442A-BE86-96357B70F4FE} /qn

 

I hope it is! thanks will give that a try in the morning.

  • 2 years later...
Posted

Use this Visual Basic script. Enumerates registry DisplayName for Ask Toolbar and silently uninstall.

 

'find and display uninstallstring in "constant CHECK_MASK". Matches DisplayName in registry using regexp.

'uncomment owsh.run to actually run uninstall

'http://en.wikipedia.org/wiki/Regular_expression

 

 

const CHECK_MASK="^Ask" 'checks beginning of DisplayName for Ask

 

 

const HKEY_CLASSES_ROOT = &H80000000

const HKEY_CURRENT_USER = &H80000001

const HKEY_LOCAL_MACHINE = &H80000002

const HKEY_USERS = &H80000003

const HKEY_CURRENT_CONFIG = &H80000004

const HKEY_DYN_DATA = &H80000005

 

 

strComputer = "."

 

 

Set RegEx = CreateObject("VBScript.RegExp")

RegEx.IgnoreCase = False ' CHECK_MASK have to be case sensitive

RegEx.Global= True

RegEx.Pattern=CHECK_MASK

 

 

set oWsh = createobject("wscript.shell")

 

 

Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" _

& strComputer & "\root\default:StdRegProv")

 

'32 bit

strKeyPath32 = "software\microsoft\windows\currentversion\uninstall" 'Root level

oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath32, arrSubKeys

 

 

For Each subkey In arrSubKeys

on error resume next

sDisplayName = oWsh.Regread("HKLM\" & strKeyPath32 & "\" & subkey & "\DisplayName")

if err.number = 0 then

on error goto 0

if regex.test(sDisplayName) = True then

On Error Resume Next

sUninstall = oWsh.Regread("HKLM\" & strKeyPath32 & "\" & subkey & "\UnInstallString")

If Err.Number = 0 Then

 

strSearchFor = "/I" 'checks if uninstallstring contains /i instead of /x

 

 

If InStr(1, sUninstall, strSearchFor) > 0 then

newUninstall = replace(sUninstall,strsearchfor,"/X") 'replace /i with /x

wsh.echo subkey, vbCRLF, sDisplayName, vbCRLF, newUnInstall, vbCRLF, vbCRLF 'comment to run

'owsh.run newUninstall & " /quiet /norestart" 'uncomment to actually run

 

 

Else

wsh.echo subkey, vbCRLF, sDisplayName, vbCRLF, sUnInstall, vbCRLF, vbCRLF 'comment to run

'owsh.run sUninstall & " /quiet /norestart" 'uncomment to actually run

End If

 

Else

 

End If

On Error GoTo 0

end if

end if

Next

 

 

'64 bit

strKeyPath64 = "software\Wow6432Node\microsoft\windows\currentversion\uninstall" 'Root level 64 bit

if oReg.EnumKey (HKEY_LOCAL_MACHINE, strKeyPath64, arrSubKeys) = 0 Then

 

 

For Each subkey In arrSubKeys

on error resume next

sDisplayName = oWsh.Regread("HKLM\" & strKeyPath64 & "\" & subkey & "\DisplayName")

if err.number = 0 then

on error goto 0

if regex.test(sDisplayName) = True then

On Error Resume Next

sUninstall = oWsh.Regread("HKLM\" & strKeyPath64 & "\" & subkey & "\UnInstallString")

If Err.Number = 0 Then

 

strSearchFor = "/I" 'checks if uninstallstring contains /i instead of /x

 

 

If InStr(1, sUninstall, strSearchFor) > 0 then

newUninstall = replace(sUninstall,strsearchfor,"/X") 'replace /i with /x

wsh.echo subkey, vbCRLF, sDisplayName, vbCRLF, newUnInstall, vbCRLF, vbCRLF 'uncomment to run

'owsh.run newUninstall & " /quiet /norestart" 'uncomment to actuall run

 

 

Else

wsh.echo subkey, vbCRLF, sDisplayName, vbCRLF, sUnInstall, vbCRLF, vbCRLF 'uncomment to run

'owsh.run sUninstall & " /quiet /norestart" 'uncomment to actually run

End If

 

Else

 

End If

On Error GoTo 0

end if

end if

Next

Else

End if

on error goto 0

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...