Windows 10: A vbs script to create a system restore point?

Discus and support A vbs script to create a system restore point? in Windows 10 Support to solve the problem; Hi. I have always used this vbs script in Windows 7.. it brings up a dialogue box, into which you enter your restore point naem, and that's it. Works a... Discussion in 'Windows 10 Support' started by martinlest, Sep 27, 2018.

  1. A vbs script to create a system restore point?


    Hi. I have always used this vbs script in Windows 7.. it brings up a dialogue box, into which you enter your restore point naem, and that's it. Works a charm. But I can't see how to adapt it so that it will work in Windows 10? Can anyone kindly help? Thanks!

    Code: WScript.Sleep 1000 If GetOS = "Windows 7" Then If WScript.Arguments.length =0 Then Set objShell = CreateObject("Shell.Application") objShell.ShellExecute "wscript.exe", """" & _ WScript.ScriptFullName & """" & " uac","", "runas", 1 Else CreateSRP End If End If Sub CreateSRP Set SRP = getobject("winmgmts:\\.\root\default:Systemrestore") sDesc = "" sDesc = InputBox ("Enter a Restore Point description.", "Create System Restore Point","") If Trim(sDesc) <> "" Then sOut = SRP.createrestorepoint (sDesc, 0, 100) If sOut <> 0 Then WScript.echo "Error " & sOut & _ ": Unable to create System Restore Point." End If End If End Sub Function GetOS Set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _ ".\root\cimv2") Set colOS = objWMI.ExecQuery("Select * from Win32_OperatingSystem") For Each objOS in colOS If instr(objOS.Caption, "Windows 7") Then GetOS = "Windows 7" End If Next End Function[/quote]

    :)
     
    martinlest, Sep 27, 2018
    #1

  2. creating a restore point

    Hi Anthony,

    We understand that you're having an issue with creating a restore point. For us to further assist you, we'd like to gather additional information.

    • Have you tried creating system restore point manually?
    • Have you tried any troubleshooting steps before posting this concern? If yes, what are those?

    If you haven't created a system restore point manually, you can refer to the article below and follow the instructions given. Disable your antivirus or security software and then try to create a system restore point manually.

    Create a system restore point

    Looking forward to your response.
     
    Reymichael Ros, Sep 27, 2018
    #2
  3. Win 10 Anniversary Restore Point Puzzle

    I believe in restore points. They have saved my hash on several occasions.

    I believe in them so much that I run a script every day to create one.

    This script relies on what appears to be a VBS function "createrestorepoint" applied to a VBS object of type "winmgmts:\\.\root\default:Systemrestore".

    This worked fine before the Anniversary edition was installed over the prior Win 10.

    The problem is this: when invoked, it runs all right, and takes some time (as it should), and the function returns a "success" flag which produces a very nice MsgBox reporting success, but the System Restore button on the System Properties System Protection
    tab does not show the restore point as existing.

    When I create a restore point using the Create button on the System Properties System Protection tab to create a restore point, System Restore /does/ list the restore point.

    Note that System Restore lists the restore points available when you select the "Choose a different restore point" and then select "Next".

    Using the Configure button on the System Properties System Protection tab, shows this values for "Current Usage":

    2.06 before any attempt

    2.12 after the /manual/ attempt

    2.19 after the /scripted/ attempt -- which followed the manual attempt immediately

    So I think what is happening is that the script is, indeed, creating a System Restore point, but System Restore cannot see it. Of course, I am simply describing what I am looking at, and what is really happening could be quite different.

    Indeed, the Current Usage is showing 2.32, but I have made no further attempts and no additional System Restore points are listed. So something else is also affecting this value.

    My question, of course, is: how do I get System Restore to recognize the script-created restore points?
     
    PaulPerson, Sep 27, 2018
    #3
  4. Brink Win User

    A vbs script to create a system restore point?

    Brink, Sep 27, 2018
    #4
Thema:

A vbs script to create a system restore point?

Loading...
  1. A vbs script to create a system restore point? - Similar Threads - vbs script create

  2. System restore points not being created

    in Windows 10 Software and Apps
    System restore points not being created: I've recently had to check what system restore points were available on some of my PC's Windows 10 & 11I'm concerned that although I have system protection enabled on all the drives, only the latest system restore point is present; I dont want to allocate a LOT of space as my...
  3. Unable to create a system restore point

    in Windows 10 Gaming
    Unable to create a system restore point: I'm installing Windows 11 so trying to create a system restore point but for some reason it's greyed out. Unclear why. Other questions like this are years old....
  4. Unable to create a system restore point

    in Windows 10 Software and Apps
    Unable to create a system restore point: I'm installing Windows 11 so trying to create a system restore point but for some reason it's greyed out. Unclear why. Other questions like this are years old....
  5. Unable to create a system restore point

    in Windows 10 Installation and Upgrade
    Unable to create a system restore point: I'm installing Windows 11 so trying to create a system restore point but for some reason it's greyed out. Unclear why. Other questions like this are years old....
  6. Cannot creat a System Restore point

    in Windows 10 BSOD Crashes and Debugging
    Cannot creat a System Restore point: When I try to create a System Restore Point, I get the following message: The restore point could not be created for the following reason: The writer's timeout expired between the Freeze and Thaw events 0x800423F2 Any ideas what I should do? Thanks Scott...
  7. System Restore will not create a restore point

    in Windows 10 Installation and Upgrade
    System Restore will not create a restore point: This has been a recurring problem on my HP Pavilion with Windows 10 64bit. I cannot create a System Restore point and System Protection will not turn on. It just keep searching for drives. The error code given is 0x81000203. I have also tried installing Macrium Reflect as a...
  8. Cannot create a system restore point

    in Windows 10 BSOD Crashes and Debugging
    Cannot create a system restore point: When i was trying to create a system restore point, it failed and a message poped up saying, "the writer experienced a non-transient error. If tried again the error may reoccur". I've tried sfc command. It says some corrupt file found but cannot fix it... What are the causes...
  9. Script Create Restore Point Windows 10

    in Windows 10 Installation and Upgrade
    Script Create Restore Point Windows 10: Hay everyone, i have question, i want to create restore point for Windows 10 (All Version Windows 10 and Specified Windows 10 Professional), but i want create it by script, i have create restore point for Windows 7 just like that : Wmic.exe /Namespace:\\root\default Path...
  10. can not create/restore system point

    in Windows 10 Backup and Restore
    can not create/restore system point: Hi. can not create/restore system point. Please help, Thanks. 79135

Users found this page by searching for:

  1. vbs CreateRestorePoint

    ,
  2. system restore point windows 10 vbs