SystemRestore 類別的 GetLastRestoreStatus 方法
擷取上次系統還原的狀態。
語法
uint32 GetLastRestoreStatus();
參數
這個方法沒有任何參數。
傳回值
方法會傳回下列其中一個狀態值。
傳回值 | 描述 |
---|---|
|
上次還原失敗。 |
|
上次還原成功。 |
|
上次還原已中斷。 |
範例
'GetLastRestoreStatus Method of the SystemRestore Class
'Retrieves the status of the last system restore.
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
規格需求
需求 | 值 |
---|---|
最低支援的用戶端 |
Windows XP [僅限傳統型應用程式] |
最低支援的伺服器 |
都不支援 |
命名空間 |
Root\Default |
MOF |
|