?
Solved

Hotfix Scan Tool (VBS) won't run

Posted on 2007-10-18
6
Medium Priority
?
1,072 Views
Last Modified: 2012-05-05
When I run Microsoft's hotfixscantool.vbs (kb 931940-v2) , I get error message:
Script: C:\windows\system32\hotfixscantool.vbs
Line  588
Char: 9
Error: Handle is invalid  Code
Code: 80070006
Source (Null)
-------
OS ia Win Server 2003 SP2.
-------
How do I fix this?
0
Comment
Question by:grant-ellsworth
  • 3
  • 3
6 Comments
 
LVL 8

Expert Comment

by:Mikkk
ID: 20101819
can you paste the script code (or part of it) here if it is not too long?
0
 
LVL 1

Author Comment

by:grant-ellsworth
ID: 20101983
Here it is.  The ms article said we could use this on the Win x32 version of win server 2003
---------------------------------------------
Option Explicit

REM Microsoft Corporation
REM (c) 2005 All rights reserved
REM
REM Hotfix scan tool for Microsoft Windows Server 2003 and Windows XP x64 SP2
REM

const HKEY_LOCAL_MACHINE = &H80000002
Const HKEY_USERS = &H80000003

const HOTFIXKEY      = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Hotfix"
const HOTFIXREFRESHKEY   = "SOFTWARE\Microsoft\Windows\CurrentVersion\Setup"
dim HOTFIXUNINSTALLKEY

const REFRESHFLAGNAME  = "HotfixRefreshRequired"
const UNINSTALLCOMMAND = "UninstallCommand"
const DONOTREMOVE      = "DoNotRemove"
const COMMENTS         = "Comments"

const COMPUTER = "."

const HELP_ARGUMENT_1    = "help"
const HELP_ARGUMENT_2    = "?"
const HELP_ARGUMENT_3    = "h"
const UNINSTALL_ARGUMENT = "u"
const VERBOSE_ARGUMENT   = "v"
const UNBLOCK_ARGUMENT   = "d"
const UNATTEND_ARGUMENT  = "q"

const DEBUG_MODE = FALSE     ' Set to TRUE to turn ON the DEBUG Prints

dim   UNINSTALLOPTIONS
dim   VERBOSE_MODE            ' Set to 1 to turn ON the Verbose mode
dim   UNATTEND_MODE

Dim LogPath
Dim objFSO
Dim objFile
Dim SPVersion
Dim IsWindowsXP

const BLK_HF_CNT = 30        ' Number of Blocklisted Hotfixes
                             ' Make sure to increment this value if more KB's are blocklisted.
dim arrUninstalList()        ' List of Blocklisted Hot-fixes currently installed.

const MAX_HOTFIXES = 300     ' MAX number of possible Hotfixes that are installed on the system

dim HotfixHitCount           ' Number of Blocklisted hot fixes currently installed.
dim StdOut


Main
'-----------------------------------------------------------------------------
public sub Main
    dim errorCode
    dim Action

    ' Initialization
    ReDim arrUninstalList( BLK_HF_CNT )
    Init ()

    ' Validate if the Windows Product Type is Server 2003 or Windows XP x64. Bail off if not Windows Server 2003 or Windows XP x64
    if (ValidateWindows() = FALSE) then
        WScript.Quit()
    end if

    ' In debug mode by default turn ON the verbose mode as well
    if DEBUG_MODE then
        VERBOSE_MODE = 1
    else
        VERBOSE_MODE = 0
    end if

    ' Process Arguments
    if SPVersion = 2 then
        Action = ProcessArgumentsSP2()
    else
        Action = ProcessArguments()
    end if

    select case Action
    case 0:
        ' Detect if any of the Block list KB's are installed.
        ' If so set the registry value "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup\HotfixRefreshRequired" to 1
        Log "Detecting if any updates in the Block installation list were installed on the system..."
      Log ""

        if FindBlockedHotfixes() = true then
            if DEBUG_MODE then Log "FindBlockedHotfixes() returned  TRUE"

            Log ""
            Log "Found " & HotfixHitCount & "  updates blocking installation."

            if SetHRFFlag() <> 0 then
                if VERBOSE_MODE then Log "Unable to set the Registry Key [ HKLM\" & HOTFIXREFRESHKEY & "\" & REFRESHFLAGNAME & " ]"
                errorCode = 1
            else
                if VERBOSE_MODE then Log "Successfully set Registry Key [ HKLM\" & HOTFIXREFRESHKEY & "\" & REFRESHFLAGNAME & " ]"
                Log "Installation of Windows Server 2003 SP2 is blocked."
            Log ""
                Log "Contact Microsoft Support(http://support.microsoft.com/) for refreshed updates"
                Log "To unblock installation of Windows Server 2003 SP2 with out uninstalling the listed updates, re-run this tool with the " & "/" & UNBLOCK_ARGUMENT & " option."
            end if
        else
            Log "No updates in the block installation list were detected."
            Log "You can proceed to install Windows Server 2003 SP2"
        end if
    case 1:
        ' Display Help
        Usage
    case 2:
        ' uninstal already installed BlockListed Hotfixes (if any)
        Log "Detecting if any updates in the Block Installation list were installed on the system..."
        Log ""
        if FindBlockedHotfixes() = true then
            if DEBUG_MODE then Log "FindBlockedHotfixes() returned  TRUE"
            Log ""
            Log "Found " & HotfixHitCount & " updates blocking installation."
            Log ""
            Log "Uninstalling already installed updates from block installation list..."

            if UninstalBlockedHotfixes() = true then
                Log "Uninstall Successful."
                if VERBOSE_MODE then Log "Deleting the HOTFIXREFRESHKEY..."
                Log "Unblocking installation of Windows Server 2003 SP2..."

                if DelHRFFlag() <> 0 then
                    if VERBOSE_MODE then Log "Deleting the HOTFIXREFRESHKEY failed"
                    Log "Unblocking installation of Windows Server 2003 SP2 failed."
                else
                    if VERBOSE_MODE then Log "Deleting the HOTFIXREFRESHKEY Successful"
                    Log "Successfully Unblocked installation of Windows Server 2003 SP2."
                    Log "You can proceed to install Windows Server 2003 SP2"
                end if
            else
                Log "Uninstall failed."
            end if
        else
            Log "No block installation list updates are installed."
        end if

    case 3:
        ' Delete the HOTFIXREFRESHKEY if already set
        if VERBOSE_MODE then Log "Deleting the HOTFIXREFRESHKEY..."
        Log "Unblocking installation of Windows Server 2003 SP2..."
       
        if DelHRFFlag() <> 0 then
            Log "Windows Server 2003 SP2 installation is still blocked."
        else
            Log "Windows Server 2003 SP2 installation was successfully successfully unblocked."
        end if        

    case 4:

    case 5:
        ' SP2 already installed. Find the Regressed KB's
      Log "Detecting updates that were regressed due to installation of Windows Server 2003 SP2..." & vbCrLf

        if FindBlockedHotfixes() = true then
            if DEBUG_MODE then Log "FindBlockedHotfixes() returned  TRUE"

            Log vbCrLf & "Listed " & HotfixHitCount & " updates were regressed."
            Log "Contact Microsoft Support(http://support.microsoft.com/) for refreshed updates"
        else
            Log "No updates were regressed due to installation of Windows Server 2003 SP2."            
        end if

    end select

    if DEBUG_MODE then Log "Exiting with code " & errorCode
    Set StdOut = Nothing
    WScript.Quit errorCode
end sub


REM Returns true if there are 0 or more test hotfixes installed
REM Returns false otherwise
public function FindBlockedHotfixes
    dim strKeyPath, strValuePath, strValue, subKey, KBCount
    dim objReg, objExec
dim strOutput
    dim arrSubKeys()
    dim arrRegKeys()     ' Hotfixes installed prior to SP2 install
    dim arrBlockList()   ' Array size should be equal to the array size of arrUninstalList
    dim RegKeyCount
    dim FoundBlockedHotfix

    ReDim arrSubKeys(MAX_HOTFIXES)
    ReDim arrRegKeys(MAX_HOTFIXES)
    ReDim arrBlockList(BLK_HF_CNT)

    FoundBlockedHotfix = FALSE
    RegKeyCount = 0

    ' Initialize the arrBlockList with the Blocked KB numbers
    ' NOTE: Don't leave any of any array element empty between two block list
    arrBlockList(0)   = "898073"
    arrBlockList(1)   = "918005"
    arrBlockList(2)   = "918837"
    arrBlockList(3)   = "919757"
    arrBlockList(4)   = "924078"
    arrBlockList(5)   = "924301"
    arrBlockList(6)   = "925020"
    arrBlockList(7)   = "925240"
    arrBlockList(8)   = "925290"
    arrBlockList(9)   = "925513"
    arrBlockList(10)  = "926047"
    arrBlockList(11)  = "926132"
    arrBlockList(12)  = "926305"
    arrBlockList(13)  = "926513"
    arrBlockList(14)  = "926583"
    arrBlockList(15)  = "926754"
    arrBlockList(16)  = "926940"
    arrBlockList(17)  = "927197"
    arrBlockList(18)  = "927291"
    arrBlockList(19)  = "927436"
    arrBlockList(20)  = "927493"
    arrBlockList(21)  = "927893"
    arrBlockList(22)  = "928194"
    arrBlockList(23)  = "929066"
    arrBlockList(24)  = "929620"
    arrBlockList(25)  = "929759"
    arrBlockList(26)  = "930620"
    arrBlockList(27)  = "933452"
    arrBlockList(28)  = ""       ' Making sure that the array elements ends with ("")

    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & COMPUTER & "\root\default:StdRegProv")

    if SPVersion = 2 then
        ' Load the Hive file software.sp
        Dim ObjShell
        set objshell = CreateObject("Wscript.shell")
        set objExec = objshell.Exec ("reg.exe load HKU\Temp %windir%\system32\config\software.sp")

        ' Display the output got by running the uninstall.exe specific to the Blocklisted KB  
        Do While Not objExec.StdOut.AtEndOfStream
            strOutput = objExec.StdOut.ReadAll
            if VERBOSE_MODE then Log strOutput
        Loop


        strKeyPath = "Temp\Microsoft\Windows NT\CurrentVersion\HotFix"
        objReg.EnumKey HKEY_USERS, strKeyPath, arrSubKeys
        if DEBUG_MODE then Log " KeyPath = " & strKeyPath
    else
        strKeyPath = HOTFIXKEY
        objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
    end if


    ' Read the list of registry Keys correspending to ALL the installed KB's into an array (arrRegKeys)
    For Each subkey In arrSubKeys

        strValuePath = strKeyPath & "\" & subKey

        if SPVersion = 2 then
            objReg.GetExpandedStringValue HKEY_USERS,strValuePath,COMMENTS,strValue
        else
            objReg.GetExpandedStringValue HKEY_LOCAL_MACHINE,strValuePath,COMMENTS,strValue
        end if

        if DEBUG_MODE then Log "reg Key = " & strValue

        arrRegKeys(RegKeyCount) = strValue

        if DEBUG_MODE then Log "arrRegKeys(" & RegKeyCount & ") = " & arrRegKeys(RegKeyCount)

        RegKeyCount = RegKeyCount + 1
    Next

    KBCount = 0
    HotfixHitCount = 0

    ' Find the list of Blocked KB's already installed
    Do Until arrBlockList(KBCount) = ""
        For Each RegKeyCount in arrRegKeys
            if instr(RegKeyCount, arrBlockList(KBCount)) > 0 then
                FoundBlockedHotfix = true
                arrUninstalList(HotfixHitCount) = "KB" & arrBlockList(KBCount)
                HotfixHitCount = HotfixHitCount + 1

            Log "DETECTED Update: " & RegKeyCount & ", Key =" & arrBlockList(KBCount)
            end if
        Next
        KBCount = KBCount + 1
    Loop

    if SPVersion = 2 then
        objshell.Exec ("reg.exe unload HKU\Temp")
    end if

    FindBlockedHotfixes = FoundBlockedHotfix            
end function


REM Returns true if all the already installed Blocklisted Hotfixes are uninstalled
REM Returns false otherwise
public function UninstalBlockedHotfixes

    dim strKeyPath, strValuePath, strValue, subKey, BlkListCount
    dim objReg
    dim objShell,objExec
    dim strOutput
    dim Command
    dim Return

    Set objShell = CreateObject("WScript.Shell")
    Return = true
    strKeyPath = HOTFIXUNINSTALLKEY

    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & COMPUTER & "\root\default:StdRegProv")

    ' For each Blocked KB's already installed in the system,
    ' Get the path to the spuninst.exe and execute the same
    For BlkListCount=0 to HotfixHitCount-1
        strValue = ""
        strValuePath = strKeyPath & "\" & arrUninstalList(BlkListCount)

        if VERBOSE_MODE then Log "Uninstalling " & arrUninstalList(BlkListCount) & " ..."

        if objReg.GetExpandedStringValue(HKEY_LOCAL_MACHINE,strValuePath,UNINSTALLCOMMAND,strValue) <> 0 then
            if DEBUG_MODE then Log "Accessing HKLM\" & strValuePath & "\" & UNINSTALLCOMMAND & " failed."
            if VERBOSE_MODE then Log "Uninstalling " & arrUninstalList(BlkListCount) & " failed."
            Return = false
        else
            if DEBUG_MODE then Log "Uninstall path for" & arrUninstalList(BlkListCount) & " = " & strValue

            Command = strValue & " " & UNINSTALLOPTIONS

            ' Run the uninstall.exe corresponding to the Blocklisted KB
            if VERBOSE_MODE then Log "Uninstalling " & arrUninstalList(BlkListCount)
            Set objExec = objShell.Exec(Command)

            ' Display the output got by running the uninstall.exe specific to the Blocklisted KB  
            Do While Not objExec.StdOut.AtEndOfStream
                 strOutput = objExec.StdOut.ReadAll
                 Log strOutput
            Loop
            if VERBOSE_MODE then Log "Uninstalling " & arrUninstalList(BlkListCount) & " successful."
        end if
    Next

    UninstalBlockedHotfixes = Return
end function


REM Returns 0 if Registry Value HotfixRefreshRequired could be set (or already set)
REM Returns 1 if Registry Value HotfixRefreshRequired could not be set
REM Any other return value indicates an error in the script
REM
REM Assumes HOTFIXREFRESHKEY already exists
public function SetHRFFlag
    dim Return
    Return = 2
   
    dim objReg
    Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & COMPUTER & "\root\default:StdRegProv")

    ' set protect bit
    Return = objReg.SetDWORDValue(HKEY_LOCAL_MACHINE, HOTFIXREFRESHKEY, REFRESHFLAGNAME, 1)

    if Err.Number = 0 then
        if VERBOSE_MODE then Log "[ " & HOTFIXREFRESHKEY & " ] successfully set or already exists"
        Return = 0
    else
        if VERBOSE_MODE then Log "Failed trying to set Hotfix Refresh Flag with error number " & Err.Number
        Return = 1
    end if

    SetHRFFlag = Return
end function


REM Returns 0 if Deleting the Registry Value HotfixRefreshRequired succeeded
REM Returns 1 if Deleting the Registry Value HotfixRefreshRequired failed
REM Any other return value indicates an error in the script
public function DelHRFFlag
    dim Return
    Return = 2
   
    dim objReg
    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & COMPUTER & "\root\default:StdRegProv")

    Return = objReg.DeleteValue(HKEY_LOCAL_MACHINE, HOTFIXREFRESHKEY, REFRESHFLAGNAME)
    if Err.Number = 0 then
        if Return = 0 then
            if VERBOSE_MODE then Log "[ " & REFRESHFLAGNAME & " ] successfully deleted"
        else
            if VERBOSE_MODE then Log "[ " & REFRESHFLAGNAME & " ] not found"
            Return = 0
        end if
    else
        if VERBOSE_MODE then Log "Failed trying to Delete the HotFixRefreshKey with error number " & Err.Number
        Return = 1
    end if

    DelHRFFlag = Return
end function


' Displays the Help
public sub Usage
if SPVersion = 1 then
    Log WScript.ScriptName & " - Microsoft Windows Server 2003 SP2 Hotfix scan tool" & vbCrLf
    Log "Usage: " & WScript.ScriptName & " [ [/" & UNBLOCK_ARGUMENT & "] [/" & HELP_ARGUMENT_1 & "] [/" & HELP_ARGUMENT_2 & "] [/" & HELP_ARGUMENT_3 & "] ]" & " [/" & VERBOSE_ARGUMENT & "]" & " [/" & UNATTEND_ARGUMENT & "]" & vbCrLf
    Log "[Options] " & vbCrLf
    Log "       : Lists Updates that will regress if Windows Server 2003 SP2 is installed."
    Log "    /" & UNBLOCK_ARGUMENT & " : Unblocks the Windows Server 2003 SP2 installation (if blocked)"
    Log "    /" & VERBOSE_ARGUMENT & " : Detailed logging"
    Log "    /" & UNATTEND_ARGUMENT & " : Quiet mode (Only Log in file) "
    Log "    /" & HELP_ARGUMENT_1 & " or /" & HELP_ARGUMENT_2 & " or /" & HELP_ARGUMENT_3 & " : displays usage"
else
    Log WScript.ScriptName & " - Microsoft Windows Server 2003 SP2 Hotfix scan tool" & vbCrLf
    Log "Usage: " & WScript.ScriptName & " [ [/" & HELP_ARGUMENT_1 & "] [/" & HELP_ARGUMENT_2 & "] [/" & HELP_ARGUMENT_3 & "] ]" & " [/" & VERBOSE_ARGUMENT & "]" & " [/" & UNATTEND_ARGUMENT & "]" & vbCrLf
    Log "[Options] " & vbCrLf
    Log "       : Lists Updates that were regressed after Windows Server 2003 SP2 installed."
    Log "    /" & VERBOSE_ARGUMENT & " : Detailed logging"
    Log "    /" & UNATTEND_ARGUMENT & " : Quiet mode (Only Log in file) "
    Log " /" & HELP_ARGUMENT_1 & " or /" & HELP_ARGUMENT_2 & " or /" & HELP_ARGUMENT_3 & " : displays usage"
end if
end sub


REM Process the arguments and return corresponding Value
private function ProcessArguments()
    dim ArgNamed, ArgUnnamed, ArgCount
    Set ArgNamed = WScript.Arguments.Named
    Set ArgUnnamed = WScript.Arguments.Unnamed
    ArgCount = 0

    if (ArgNamed.Exists(HELP_ARGUMENT_1) OR ArgNamed.Exists(HELP_ARGUMENT_2) OR ArgNamed.Exists(HELP_ARGUMENT_3)) then
        set ArgNamed = Nothing
        set ArgUnnamed = Nothing
        ProcessArguments = 1
        if DEBUG_MODE then Log "Help requested"        
        Exit function
    end if

    if ArgUnnamed.Count > 0 then
        if DEBUG_MODE then Log "Unnamed arguments found"
        Log "Unsupported arguments provided."
        ProcessArguments = 4
    else
        if ArgNamed.Count > 0 then
            if ArgNamed.Exists(VERBOSE_ARGUMENT) then
              VERBOSE_MODE = TRUE
            ArgCount = ArgCount + 1
            end if

            if ArgNamed.Exists(UNATTEND_ARGUMENT) then
                UNINSTALLOPTIONS = "/quiet /norestart"
                UNATTEND_MODE    = TRUE
            ArgCount = ArgCount + 1
            end if

            if DEBUG_MODE then Log "There are " & ArgNamed.length & " named arguments."
            if DEBUG_MODE then Log "There are " & ArgUnnamed.length & " unnamed arguments."

          if ((ArgNamed.Count - ArgCount) = 0) then
              set ArgNamed   = Nothing
            set ArgUnnamed = Nothing
            ProcessArguments = 0
            else
                if ArgNamed.Exists(UNINSTALL_ARGUMENT) then
                    ProcessArguments = 2
                else
                    if ArgNamed.Exists(UNBLOCK_ARGUMENT) then
                        ProcessArguments = 3
                    else
                        if VERBOSE_MODE <> TRUE then Log "Ignoring unknown arguments."
                    end if
                end if

            if ArgNamed.Count > 2 then
                    if VERBOSE_MODE <> TRUE then Log "Truncating the remaining arguments."
            end if

            end if
        else
            ' No arguments provided, do detection
            ProcessArguments = 0
        end if
    end if

    set ArgNamed = Nothing
    set ArgUnnamed = Nothing

end function

' Process the arguments and return corresponding Value
' called for SP2
private function ProcessArgumentsSP2()
    dim ArgNamed, ArgUnnamed, ArgCount
    Set ArgNamed = WScript.Arguments.Named
    Set ArgUnnamed = WScript.Arguments.Unnamed
    ArgCount = 0

    if (ArgNamed.Exists(HELP_ARGUMENT_1) OR ArgNamed.Exists(HELP_ARGUMENT_2) OR ArgNamed.Exists(HELP_ARGUMENT_3)) then
        set ArgNamed = Nothing
        set ArgUnnamed = Nothing
        ProcessArgumentsSP2 = 1
        if DEBUG_MODE then Log "Help requested"        
        Exit function
    end if

    if ArgUnnamed.Count > 0 then
        if DEBUG_MODE then Log "Unnamed arguments found"
        Log "Unsupported arguments provided."
        ProcessArgumentsSP2 = 4
    else
        if ArgNamed.Count > 0 then
            if ArgNamed.Exists(VERBOSE_ARGUMENT) then
              VERBOSE_MODE = TRUE
            ArgCount = ArgCount + 1
            end if

            if ArgNamed.Exists(UNATTEND_ARGUMENT) then
                UNATTEND_MODE    = TRUE
            ArgCount = ArgCount + 1
            end if

            if ArgNamed.Count > ArgCount then
                if VERBOSE_MODE <> TRUE then Log "Ignoring unknown arguments."
            end if
            ProcessArgumentsSP2 = 5
        else
            ' No arguments provided, do detection
            ProcessArgumentsSP2 = 5
        end if

    end  if
   
end function

private function Init()

    Dim LogPath
   
    LogPath = WScript.ScriptFullName
    LogPath = Replace(LogPath, WScript.ScriptName, "")
    LogPath = LogPath & GetComputerName() & "_log.txt"

    HOTFIXUNINSTALLKEY = "SOFTWARE\Microsoft\Updates\Windows Server 2003\SP2"
    UNINSTALLOPTIONS = "/passive /norestart"
    VERBOSE_MODE     = FALSE
    UNATTEND_MODE    = FALSE
    HotfixHitCount   = 0
    IsWindowsXP      = 0

    Set StdOut = WScript.StdOut

    ' Initialize log
    Set objFSO = CreateObject("Scripting.FileSystemObject")

    ' If the file is already present then the log file will be overwritten
    Set objFile = objFSO.CreateTextFile(LogPath)

end function



private function GetComputerName()

 Dim InfoNT
 Set InfoNT = CreateObject("WinNTSystemInfo")
 GetComputerName = lcase(InfoNT.ComputerName)

end Function


private function UnInit()
    ' close Log file
    objFile.Close
end function


public function Log(Msg)

    if (IsWindowsXP = 1) then
       Msg = Replace(Msg, "Windows Server 2003", "Windows XP x64")
    end if

    if (UNATTEND_MODE) then
        objFile.Writeline (Msg)
    else
        objFile.Writeline (Msg)
        StdOut.WriteLine (Msg)
    end if

end function


' Detects the OS installed
' Detects if Windows Server 2003 SP2 is already installed
' Returns TRUE  - if Product Type is Windows Server 2003 or Windows XP x64
'         FALSE - if Product Type is not Windows Server 2003 or Windows XP x64
' Global Variable SPVersion:  0 - NONE
'                             1 - Not SP2
'                             2 - SP2
private function ValidateWindows()
    Dim objReg
    Dim strValuePath
    Dim strValue
    Dim Return

    Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & COMPUTER & "\root\default:StdRegProv")

    strValuePath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
    strValue = ""
    Return = FALSE

    if objReg.GetExpandedStringValue(HKEY_LOCAL_MACHINE,strValuePath,"ProductName",strValue) <> 0 then
        if DEBUG_MODE then Log "Accessing HKLM\" & strValuePath & "\" & "ProductName" & " failed."
    else
        if (Instr(strValue, "Microsoft Windows Server 2003")) then
            if DEBUG_MODE then Log "Windows Product Name successfully validated."

            Return = TRUE

            ' check if SP2 is installed
            strValuePath = "SOFTWARE\Microsoft\Updates\Windows Server 2003\SP2\KB914961"
            if objReg.GetExpandedStringValue(HKEY_LOCAL_MACHINE,strValuePath,"Description",strValue) <> 0 then
                ' SP2 not installed
                if DEBUG_MODE then Log "SP2 not yet Installed."
                SPVersion = 1
            else
                SPVersion = 2
                if DEBUG_MODE then Log "SP2 already Installed."
            end if

      else
            if (Instr(strValue, "Microsoft Windows XP")) then
                IsWindowsXP = 1
                HOTFIXUNINSTALLKEY = "SOFTWARE\Microsoft\Updates\Windows XP\SP2"
              if DEBUG_MODE then Log "Windows Product Name successfully validated."
                Return = TRUE

                ' check if SP2 is installed
                strValuePath = "SOFTWARE\Microsoft\Updates\Windows XP\SP2\KB914961"
                if objReg.GetExpandedStringValue(HKEY_LOCAL_MACHINE,strValuePath,"Description",strValue) <> 0 then
                    ' SP2 not installed
                    if DEBUG_MODE then Log "SP2 not yet Installed."
                    SPVersion = 1
                else
                    SPVersion = 2
                    if DEBUG_MODE then Log "SP2 already Installed."
                end if

            else
                Log "This tool can run over only Windows Server 2003 or Windows XP x64"
            end if
        end if
    end if

    ValidateWindows = Return

end function

0
 
LVL 8

Expert Comment

by:Mikkk
ID: 20102080
I get that line 588 is:
StdOut.WriteLine (Msg)
I think that you have other text in line 588.
What is the phrase of your line 588?
0
Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

 
LVL 1

Author Comment

by:grant-ellsworth
ID: 20118993
I looked as well; there was none ... what you saw is what's there.   That was knifed right from the orig vbs file.  I altered nothing.
0
 
LVL 8

Accepted Solution

by:
Mikkk earned 1000 total points
ID: 20119484
Ok, I seems that this message appears because this script should be executed from the CSCRIPT and not WSCRIPT.
Try to open a DOS Command Window (Run: CDM.exe)
and go to the folder that you have the script stored.
Then run:
C:\windows\system32> Cscript hotfixscantool.vbs

What this does is to output the result on the Dos Command prompt and not on message boxes.
It has runned for me.
Try you.
0
 
LVL 1

Author Comment

by:grant-ellsworth
ID: 20120045
Cscript solved the problem!  Console reporteed no hotfixes regressed. normal finish.  MS's instructions di not include the "how to" run the script.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I guess it is not common knowledge to most Wintel engineers/administrators: If you have an SNMP-based monitoring system in your environment (and it's common to have SNMP or Syslog) it's reasonably easy to enable monitoring of the Windows Event logs,…
Many of us need to configure DHCP server(s) in their environment. We can do that simply via DHCP console on server or using MMC snap-in on each computer with Administrative Tools installed in a network. But what if we have to configure many DHCP ser…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question