'xp_hotfix_prompt.vbs- Stops Windows Update Prompts for Hotfixes '© Doug Knox - 9/7/2003 'This code may be freely distributed/modified Option Explicit On Error Resume Next 'Declare variables Dim WSHShell, MyBox, p1, p2, q1, t Dim jobfunc 'Set the Windows Script Host Shell and assign values to variables p1 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\" p2 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\HotFix\" Q1 = InputBox("Input the KBxxxxxx or Qxxxxx number that you're being prompted to install." & vbCR & vbCR & "You should ensure that the Hotfix is actually installed on your system.","Enter Hotfix Number","None") If Q1 = "None" or IsNumeric(Left(Q1,1)) = True or Q1 = "" Then MsgBox "You must enter a Hotfix number" Wscript.Quit Elseif Len(Q1) < 7 OR Len(Q1) > 8 Then MsgBox "The Hotfix number you entered should be 7 or 8 characters long",vbokonly, "Problem!" Wscript.Quit Else Set WSHShell = WScript.CreateObject("WScript.Shell") WSHShell.RegWrite p1 & Q1 & "\", "Place Holder for Windows Update" WSHShell.RegWrite p2 & Q1 & "\Installed", 1,"REG_DWORD" End If Set WshShell = Nothing 'Describe the funtion of the script for a dialog box jobfunc = "The Registry has been modified. Windows Update" & vbCR jobfunc = jobfunc & "should no longer prompt for Hotfix " & Q1 & "." & vbCR & vbCR jobfunc = jobfunc & "Copyright 2003 - Doug Knox" & vbCR jobfunc = jobfunc & "http://www.dougknox.com" 'This section writes the correct values to the Registry t = "Confirmation" MyBox = MsgBox (jobfunc, 4096, t)