This works. Used the UDF you created Glenn.
Might be an idea to post the UDF’s as individual UDF’s in the UDF forum?

 Code:
Break on

$status = wuRestartStatus()
If $status = 0
	?"No restart required."
Else
	?"Restart required"
EndIf
Sleep 3

;FUNCTION       wuRestartStatus()
;
;ACTION         Determines the Restart Pending status
;
;AUTHOR         Glenn Barnas
;
;SYNTAX         wuRestartStatus()
;
;PARAMETERS     None
;
;REMARKS        A pending restart can prevent additional updates from being
;		 applied. This function should be called, and the system 
;		 restarted if needed, prior to attempting additional updates.
;
;RETURNS        Boolean indicating whether a restart is pending
;
;DEPENDENCIES   none
;
;TESTED WITH    W2K, WXP, W2K3
 
Function wuRestartStatus()

  Dim $ComputerStatus
  $ComputerStatus = CreateObject("Microsoft.Update.SystemInfo")
  $wuRestartStatus = $ComputerStatus.RebootRequired
  Exit @ERROR

EndFunction


Edited by Mart (2007-05-07 11:36 AM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.