Creating system recovery point thru command line - script works for Win 7, not 8.1

Hi, i am using a script for creating a system recovery point. This script works for Win 7, but not on Win 8.1

can anyone help me adjust the script, so it work also for Win 8.1, or give me any other script to do it?

here is the script that works for Win 7:

'------------------------------------------------------
'Create an instant System Restore Point under Windows 7
'------------------------------------------------------
If WScript.Arguments.Count = 0 Then
  Set oShell = CreateObject("Shell.Application")
  oShell.ShellExecute "wscript.exe", """" & WScript.ScriptFullName & """ Run", , "runas", 1
Else
  Set oWshShell = WScript.CreateObject("WScript.Shell")
  oWshShell.Popup "Creating a SystemRestore point. Please wait.", 2, "System Restore", 0
  swinmgmts = "winmgmts:\\.\root\default:Systemrestore"
  GetObject(swinmgmts).CreateRestorePoint "Scheduled Restore Point", 0, 100
   MsgBox "System Restore Point created", 0, "System Restore"
End If

February 19th, 2015 3:47am

Hi,

With PowerShell it's much easier. Just use CheckPoint-Computer cmdlet.

Free Windows Admin Tool Kit Click here and download it now
February 19th, 2015 3:49am

Hi,

Have you tried PowerShell? How was the result? Could you let us know what the error message appear when it ran in Windows 8.1?

Why didn't you use the built-in tool?

Right click This PC -> Properties -> System Protection -> Create...

February 20th, 2015 9:55am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics