RE: Restart Pending
- From: jrvilda <jrvilda@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Feb 2007 16:15:01 -0800
¿porque en windows 2000 no funciona?
solo sale 1 path, y segun el registro hay varios.
"J Ford" wrote:
There are quite a few cmd utils to detect it; however if you want to WMI.
script it you can use WMI to check for the existence of
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session
Manager\PendingFileRenameOperations" which I believe is a REG_MULTI_SZ
Which is what most of the cmd utils check to see if a reboot is
pending/needed.
Perhaps...
<script>
On Error Resume Next
Const HKEY_LOCAL_MACHINE = &H80000002
Const REG_MULTI_SZ = 7
strComputer = "."
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")
strKeyPath = "SYSTEM\CurrentControlSet\Control\Session Manager"
strValueName = "PendingFileRenameOperations"
oReg.GetMultiStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,arrValues
If Not IsNull(arrValues) Then
For Each strValue In arrValues
Wscript.Echo strValue
Next
Else
Wscript.Echo "No Pending Reboot"
End If
</script>
"Brad McDonald" wrote:
Hello,
Has anyone come up with a WMI query that determines if a system has a
pending restart waiting in the wings, following Windows Update?
I know the CreateObject("Microsoft.Update.SystemInfo"), but I'm looking to
query these systems remotely.
Thanks
Brad
- Prev by Date: Re: Script to Export Access Report
- Next by Date: Re: Writing to a customized event log
- Previous by thread: Req: Script to create directory for users listed in a file and apply permissions for each user
- Next by thread: attn: teddie - really energetic power - aw - (1/1)
- Index(es):
Relevant Pages
|