Skip to content

Latest commit

 

History

History
100 lines (59 loc) · 2.28 KB

getlastrestorestatus-systemrestore.md

File metadata and controls

100 lines (59 loc) · 2.28 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
GetLastRestoreStatus method of the SystemRestore class
Retrieves the status of the last system restore.
03f9fd71-9f20-428e-bdca-4692e838581a
GetLastRestoreStatus method System Restore
GetLastRestoreStatus method System Restore , SystemRestore class
SystemRestore class System Restore , GetLastRestoreStatus method
apiref
SystemRestore.GetLastRestoreStatus
Root\Default
COM
reference
05/31/2018

GetLastRestoreStatus method of the SystemRestore class

Retrieves the status of the last system restore.

Syntax

uint32 GetLastRestoreStatus();

Parameters

This method has no parameters.

Return value

The method returns one of the following status values.

Return value Description
0
The last restore failed.
1
The last restore was successful.
2
The last restore was interrupted.

Examples

'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

Requirements

Requirement Value
Minimum supported client
Windows XP [desktop apps only]
Minimum supported server
None supported
Namespace
Root\Default
MOF
Sr.mof

See also

SystemRestore