'********************************************************************************* ' File: ResKitPatch.vbs (WSH in VBScript) ' Author: M. I. Gallant ' Date: 11/26/2001 ' Site: http://home.istar.ca/~neutron/ ' ' Provides automatic startup script for Win2000 Resource Kit documentation ' for IE6 to bypass error message described at: ' http://support.microsoft.com/support/kb/articles/q257/5/59.asp?id=Q257559 ' To use, first test this script alone to ensure the path to the documenation ' file is correct for your system configuration. Modify as necessary. ' Then, either use the script directly, or replace "Tools help" shortcut: ' Start | Programs |Window 2000 Professional Resource Kit | Tools help ' with a shortcut for this vbs script. ' ' Do the same for other Win2000 Resource Kit help files: ' by changing the Reskit_Title and Reskit_File values below as appropriate for these ResKit docs: ' ' Error and Event Messages: ' File: "C:\Program Files\Resource Pro Kit\w2000msgs.chm" ' Title: "Error and Event Messages Help" ' Group Policy: ' File: "C:\Program Files\Resource Pro Kit\gp.chm" ' Title: "Group Policy Reference" ' Performance Counters: ' File: "C:\Program Files\Resource Pro Kit\counters.chm" ' Title: "Windows 2000 Performance Counter Reference" ' Registry Reference: ' File: "C:\Program Files\Resource Pro Kit\regentry.chm" ' Title: "Technical Reference to the Windows 2000 Registry" '*************************************************************************************** Option Explicit Const Reskit_File = "C:\Program Files\Resource Pro Kit\regentry.chm" Const Reskit_Title = "Technical Reference to the Windows 2000 Registry" ' Window title Dim Wshshell, fso, shell, counter, iekeyname, ievaluename, ieversion ' Create the WshShell object, which Run and AppActivate require. Set Wshshell = WScript.CreateObject("WScript.Shell") Set fso = CreateObject("Scripting.FileSystemObject") If NOT fso.FileExists(Reskit_File) Then MsgBox Reskit_File & " does not exist" & vbCrLf & _ "Check the Resource Kit installation path", vbCritical WScript.Quit End If iekeyname = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\" ievaluename = "Version" set shell = CreateObject("wscript.shell") On Error Resume Next ieVersion = shell.regread(iekeyname & ievaluename) If Err.Number <> 0 Then msgbox "Invalid Registry Entry" WScript.Quit End If Wshshell.Run """" & Reskit_File & """", 1 If Left(ieVersion, 1) = "6" Then 'Dismiss warning for IE6 only. counter=0 Do While NOT Wshshell.AppActivate(Reskit_Title) ' wait until SDK doc. window is available WScript.Sleep 200 counter = counter + 1 If counter > 10 Then 'avoid infinite loop (2 secs), if problem with Reskit_Title Exit Do End If Loop Wshshell.SendKeys("{ENTER}") ' get rid of IE6 error message window End If WScript.Quit '************* End Script ********************