VBScript to create "Restore Point" in Win7


  1. Posts : 1,002
    XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)
       #1

    VBScript to create "Restore Point" in Win7


    A lot of drilling is required to create a restore-point.

    This a sample VBscript I found in my research ...
    Code:
    Set IRP = getobject("winmgmts:\\.\root\default:Systemrestore")
    strDescription = InputBox("Restore point description: ","My Restore Point")
    MYRP = IRP.createrestorepoint (strDescription, 0, 100)
    Code is rather sloppy -- not my style without declared variables and "Option Explicit"
    sstrDescription variable needs to be handled if InputBox is cancelled.

    Q1: Are these "methods" and "objects" kosher in Win7 32/64 and WinXP ?
    Q2: what are the "createrestorepoint" arguments, ie, arg2 and arg3
    Q3:
    in VBA what would be the VBEditor DLL reference be ?
    . (I use VBA for testing only and if I can install the DLL reference,
    . ( maybe there will some function/method help for "createrestorepoint"
    Q4: Am I in the appropriate forum ?
      My Computer


  2. Posts : 71,959
    64-bit Windows 11 Pro for Workstations
       #2

    Hello GrayGhost,

    You might like these better for creating a restore point instead.

    System Restore Point Shortcut

    Hope this helps, :)
    Shawn
      My Computer


  3. Posts : 1,002
    XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)
    Thread Starter
       #3

    Restore Point shortcut


    You might like these better for creating a restore point instead.
    Like it? -- love it! Thank you Shawn
    VBS file runs as portable on thumb-drive too -- I was concerned about system root.

    No doubt about it -- you are "the" man

    Just saved me some time, and brain cells writing and testing.
    Last edited by bawldiggle; 10 Apr 2013 at 03:08. Reason: because I did !
      My Computer


  4. Posts : 14,606
    Microsoft Windows 7 Home Premium 64-bit 7600
       #4

    in addition have a look at this one here,

    System Restore Point : Create at System Startup

    out of interest shawn, is it possible to add create a restore point to desktop right click context menu?
      My Computer


  5. Posts : 71,959
    64-bit Windows 11 Pro for Workstations
       #5

    You're most welcome GrayGhost. :)

    Sure thing Julian. I'll whip up a tutorial for that today with the same options, and post back with a link to it when finished.
      My Computer


  6. Posts : 1,002
    XP Pro (x86) | 7 HP (x86) & (x64) | 7 Pro (x64)
    Thread Starter
       #6

    How do I determine "Disk Space Usage" ?


    boohbah said:
    in addition have a look at this one here,
    System Restore Point : Create at System Startup
    I am new to Restore-points by 3 days

    My laptop's "Disk Space Usage" setting was zero.
    I have opted for 10% allocation based on no knowledge of my own.
    If I create a daily restore-point (or boot based) I guess the disk-space will be used up rather quickly, which could exterminate critical "foundation" RPs as the allocated space is exceeded.
    I know I can remove individual RPs using CCleaner, but I have to remember to do it
    I back up data daily, and with little or no system/program changes I do not see the merit in daily RPs just "because we do".

    I have now , however, instigated a protocol of creating a RP before installing/uninstalling/updating, OS and programs.

    Q: What is a rule of thumb for either proportional or absolute "Disk Space Usage" setting ?
    -------
    PC SPECS:
    Computer Type:= Laptop
    Manufacturer:= Toshiba Satellite C665
    OS:= Windows 7 Home Premium, sp1 (Build 7601)
    CPU:= Intel(R) Core(TM) i5-2410M CPU @ 2.30GHz
    Motherboard:= TOSHIBA Portable PC
    Memory:= 2,806 MB
    Graphics:= NVIDIA GeForce 315M *
    Sound Card:= Speakers (Conexant SmartAudio H |
    Monitors:= x1, Generic PnP
    Screen Resolution:= 1366 X 768 - 32 bit
    Hard Drives:= C: 585.4GB (used 32GB)
    PSU:=
    Cooling:= default fan
    Keyboard:= default + Logitech K260
    Mouse:= default + Logitech M210
    Internet Speed:= ADSL2
    Antivirus:= Bitdefender Internet Security 2013
    Browser:= PaleMoon, Firefox 20.0, IE-9
    Others:= USB Safely Remove, Metapad, ClipX,
    7Zip, Classic Shell Start, Explorer++, FileSearchEX, KeyboardLEDS, CapsLock,
    MalwareBytes, MyDefrag, PostBox,
      My Computer


  7. Posts : 71,959
    64-bit Windows 11 Pro for Workstations
       #7

    GrayGhost,

    With restore points, you have "Current usage" and what you set "Max usage" for what "Current usage" can get up to before automatically deleting older restore points to make room for a new one.

    There's no set rule for what to set "Max usage" to other than how much you want to be able keep more restore points saved. A restore point is very roughly around 1.35GB in size to help figure about how much "Max usage" to set for how many restore points to keep.

    System Protection - Change Disk Space Usage
      My Computer


  8. Posts : 71,959
    64-bit Windows 11 Pro for Workstations
       #8

    boohbah said:
    in addition have a look at this one here,

    System Restore Point : Create at System Startup

    out of interest shawn, is it possible to add create a restore point to desktop right click context menu?
    All finished Julian. :)

    Restore Point - Add "Create Restore Point" to Context Menu in Windows
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:37.
Find Us