Windows2003-3790/admin/pchealth/sr/tools/scripting/resstat.vbs

14 lines
289 B
Plaintext
Raw Normal View History

2001-01-01 00:00:00 +01:00
Set obj = GetObject("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore")
stat = obj.GetLastRestoreStatus()
If stat = 0 Then
wscript.Echo "Failed"
ElseIf stat = 1 Then
wscript.Echo "Success"
ElseIf stat = 2 Then
wscript.Echo "Interrrupted"
End If