Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: System Restore  (Read 2264 times)

0 Members and 1 Guest are viewing this topic.

wickedchew

    Topic Starter


    Rookie
    System Restore
    « on: November 09, 2006, 10:03:18 PM »
    Is it possible to create a System Restore checkpoint using a batch file without using the GUI of System Restore?
    "If it's there and you can see it — it's real.

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: System Restore
    « Reply #1 on: November 10, 2006, 06:04:16 AM »
    I'm not aware of a batch command to do this. You can write a Windows Script that can create a checkpoint without using the UI.

     8-)
    « Last Edit: November 10, 2006, 06:05:33 AM by Sidewinder »
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    wickedchew

      Topic Starter


      Rookie
      Re: System Restore
      « Reply #2 on: November 11, 2006, 01:01:35 AM »
      Windows Script?? I'm not aware of that. How do you make that kind of script? Any links about creating those thingymagiggies? Also, could you post that code for me to start learning those Windows Scripts.

      Thanks in advance!
      "If it's there and you can see it — it's real.


      GuruGary



        Adviser
        Re: System Restore
        « Reply #4 on: November 11, 2006, 11:36:00 PM »
        We have a batch file that creates a restore point as part of its task.  Here is the relevant portion.  The batch file basically creates a VBS, launches it, and then cleans itself up as suggested by Sidewinder:

        Code: [Select]
        @echo off
        set RestoreVBS=Restore.vbs
        set RPName=New Restore Point

        :SysRestore
        echo Checking to see if System Restore is enabled ...
        net start | find /I "System Restore" >NUL
        if not ERRORLEVEL 1 (
          echo System Restore appears to be enabled
        ) else (
          echo System Restore does not appear to be enabled!
          echo Can not create system restore point.
          echo Please enable System Restore and manually create a restore point.
          pause
          exit /b 1
        )

        :CreateRestorePoint
        echo Creating restore point ...
        echo set SRP = getobject("winmgmts:\\.\root\default:Systemrestore") >%RestoreVBS%
        echo CSRP = SRP.createrestorepoint ("%RPName%", 0, 100) >>%RestoreVBS%
        start /w wscript %RestoreVBS%
        del %RestoreVBS%
        echo Restore point "%RPName%" created