After some quick study I made some changes. Does it look good?
Code:
L_Welcome_MsgBox_Message_Text = "This will remove all third party Internet Explorer toolbars. Internet Explorer and Windows Explorer will close during this process"
L_Welcome_MsgBox_Title_Text = "klf toolbar remover v1.0 Test Only"
Call Welcome()
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
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
objReg.DeleteKey intHive, strKeyPath & "\" & SubKey
Next
End If
objReg.EnumValues intHive,strKeyPath,arrItems,arrValueTypes
If IsArray(arrItems) Then
For Each objItem In arrItems
objReg.DeleteKey intHive, strKeyPath & "\" & objItem
Next
End If
Set objReg = Nothing
End Sub
Sub Welcome()
Dim intDoIt
intDoIt = MsgBox(L_Welcome_MsgBox_Message_Text, _
vbOKCancel + vbInformation, _
L_Welcome_MsgBox_Title_Text )
If intDoIt = vbCancel Then
WScript.Quit
End If
End Sub
I found some fundamental problems with this script. It appears to make some problems with the flash player. You will need to re-install it. Maybe someone can fix this. (Make it ignore Flash Player registry entries)
Bookmarks