muchspl2
03-13-2004, 03:10 AM
Note that it removes ALL toolbars, even the ones you may want.
http://members.cox.net/ot_space/toolbarkiller.vbs
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const REG_SZ = 1
Const REG_EXPAND_SZ = 2
Const REG_BINARY = 3
Const REG_DWORD = 4
Const REG_MULTI_SZ = 7
Set objWShell = WScript.CreateObject("WScript.Shell")
objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1001", 3, "REG_DWORD"
objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1004", 3, "REG_DWORD"
objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11cf-96B8-444553540000}\Compatibility Flags", 1024, "REG_DWORD"
KillAll HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\Explorer Bars"
KillAll HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\Extensions"
KillAll HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\Toolbar"
KillAll HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Toolbar\Explorer"
KillAll HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Toolbar\ShellBrowser"
KillAll HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Toolbar\WebBrowser"
For Each Process in GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_Process")
If (InStr(LCase(process.name), "iexplore.exe") Or InStr(LCase(process.name), "explorer.exe")) Then
wscript.echo process.name
Process.terminate(0)
End If
Next
objWShell.Run "Explorer"
Sub KillAll(intHive, strKeyPath)
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
objReg.EnumKey intHive, strKeyPath, arrSubKeys
If IsArray(arrSubKeys) Then
For Each Subkey in arrSubKeys
wscript.echo "Deleting: " & strKeyPath & "\" & SubKey
objReg.DeleteKey intHive, strKeyPath & "\" & SubKey
Next
End If
objReg.EnumValues intHive,strKeyPath,arrItems,arrValueTypes
If IsArray(arrItems) Then
For Each objItem In arrItems
Wscript.Echo "Deleting: " & strKeyPath & "\" & objItem
objReg.DeleteKey intHive, strKeyPath & "\" & objItem
Next
End If
Set objReg = Nothing
End Sub
anyone see any problems
http://members.cox.net/ot_space/toolbarkiller.vbs
Const HKEY_CLASSES_ROOT = &H80000000
Const HKEY_CURRENT_USER = &H80000001
Const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003
Const REG_SZ = 1
Const REG_EXPAND_SZ = 2
Const REG_BINARY = 3
Const REG_DWORD = 4
Const REG_MULTI_SZ = 7
Set objWShell = WScript.CreateObject("WScript.Shell")
objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1001", 3, "REG_DWORD"
objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3\1004", 3, "REG_DWORD"
objWShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{D27CDB6E-AE6D-11cf-96B8-444553540000}\Compatibility Flags", 1024, "REG_DWORD"
KillAll HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\Explorer Bars"
KillAll HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\Extensions"
KillAll HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Internet Explorer\Toolbar"
KillAll HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Toolbar\Explorer"
KillAll HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Toolbar\ShellBrowser"
KillAll HKEY_CURRENT_USER, "Software\Microsoft\Internet Explorer\Toolbar\WebBrowser"
For Each Process in GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select * from Win32_Process")
If (InStr(LCase(process.name), "iexplore.exe") Or InStr(LCase(process.name), "explorer.exe")) Then
wscript.echo process.name
Process.terminate(0)
End If
Next
objWShell.Run "Explorer"
Sub KillAll(intHive, strKeyPath)
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv")
objReg.EnumKey intHive, strKeyPath, arrSubKeys
If IsArray(arrSubKeys) Then
For Each Subkey in arrSubKeys
wscript.echo "Deleting: " & strKeyPath & "\" & SubKey
objReg.DeleteKey intHive, strKeyPath & "\" & SubKey
Next
End If
objReg.EnumValues intHive,strKeyPath,arrItems,arrValueTypes
If IsArray(arrItems) Then
For Each objItem In arrItems
Wscript.Echo "Deleting: " & strKeyPath & "\" & objItem
objReg.DeleteKey intHive, strKeyPath & "\" & objItem
Next
End If
Set objReg = Nothing
End Sub
anyone see any problems