¿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 >> Stay informed about: Restart Pending