• ARTICLES
SEARCH

How-To Geek

Make a Shortcut Icon to Create a System Restore Point in Windows Vista

One of the best features in Windows Vista is the updated System Restore feature, which saves people from certain destruction on a nearly daily basis, judging from the feedback on our forums. The only problem is that it takes far too many steps to manually create a new restore point. Can’t we just make a shortcut icon for it?

Naturally, we can. It’s as simple as a little vbscript that creates a restore point.

Create a System Restore Point Shortcut Icon

If you want to manually create the script, create a new file named something.vbs and paste in the following. Otherwise the downloadable scripts are provided at the bottom of the article.

If WScript.Arguments.Count = 0 Then
    Set objShell = CreateObject(“Shell.Application”)
    objShell.ShellExecute “wscript.exe”, WScript.ScriptFullName & ” Run”, , “runas”, 1
Else
    GetObject(“winmgmts:\\.\root\default:Systemrestore”).CreateRestorePoint “description”, 0, 100
End If

You’ll notice that there’s a shellexecute line with a “runas”, which will automatically re-launch the script as administrator in order to create the restore point.

Once you have the script file saved somewhere, you’ll likely want to create a shortcut that you can customize. Just right-click / drag the file to where you want the shortcut… and choose “Create Shortcuts Here” when prompted.

 image

Now you’ll have a shortcut icon that can be used to create a restore point. Note that you could change the icon in the shortcut properties if you want, or even assign a hotkey.

image

The downloadable script contains two different scripts, the default one will prompt you to type in a description for the restore point (very helpful when restoring), but there’s also a CreateRestorePointSilent script that will simply create the restore point without the prompt.

image

If you want to verify that the restore point is created, you can open up System Restore through the start menu search or control panel, and then choose the option to “Choose a restore point”, at which point you should see the new item in the list:

image

Remember to create a restore point whenever you are making changes to your system that you aren’t confident about… like installing questionable software.

Download CreateRestorePoint Script for Manually Creating Restore Points

Lowell Heddings, better known online as the How-To Geek, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 05/14/08

Comments (18)

  1. BillyG

    Is there a version for XP?

  2. The Geek

    @BillyG

    I just uploaded a new file that contains a script for XP as well.

  3. gadzooks64

    I downloaded this scrip. When I ran it I received the following error:

    There is no file extension in “C:\Users\Gadzooks64\Documents\My”.

    What do I do now?

  4. The Geek

    @gadzooks64

    Looks like my script didn’t handle folders with spaces in the names. I’ve updated the script and re-uploaded with a fixed version. Sorry about that!

  5. gadzooks64

    Thanks! Looks like it works now.

  6. Jan

    I use something similar for XP for years with this code:

    Set IRP = getobject(“winmgmts:\\.\root\default:Systemrestore”)
    MYRP = IRP.createrestorepoint (“My Restore Point”, 0, 100)

  7. Steve

    Thanks!
    I noticed I was setting fewer restore points than I used to in XP. I’m curious if there’s a quick and easy way to check out how many restore points are saved so that I don’t keep too many and waste space?

  8. Chris

    You can also create a system restore point using this script;

    set SRP = getobject(“winmgmts:\\.\root\default:Systemrestore”)
    CSRP = SRP.createrestorepoint (“Created a Restore Point now”, 0, 100)
    If CSRP 0 then
    Msgbox “Error ” & CSRP & “: Unable to create System Restore point”
    End if

  9. Bindas

    I got the following message when I tried to cancel the operation by pressing “Cancel” button.

    Script :\CreateRestorePoint\CreateRestorePoint.vbs
    Line: 5
    Char: 2
    Error: Invalid Parameter
    Code: 80041008
    Source: SWbemObjectEx

    How can I avoid this?

  10. GeminiAlpa

    Just a little flaw: leaving the name field blank and pressing Cancel, this generates a windows script host error 80041008, line5 character2 invalid parameter.
    Discovered accidently because I wouldn’t create a restorepoint after all.
    bye, Rudolf

  11. John

    Can this .VBS file be placed in any folder?
    At first I couldn’t create a file type of .VBS, so I did a search for *.VBS & then copied an existing file to My Documents folder. I then opened & replaced contents with those you recommended. I renamed it as something I’d recognize then created a desktop shortcut for it.
    When I click on it, after I click ‘continue’, I get the following error msg: There is no file extension in “C\Users\John\Documents\My”.
    Any suggestions?
    Thank you.

  12. Slatz

    If I click on the script download what do I do then? Does it come with install directions?

    BTW…unrelated question…I tried to shut off DEP in VIsta with the command bcdedit.exe /set nx AlwaysOff and go the blue screen of death on startup. System restore wouldn’t work nor would going back to the command prompt and putting in bcdedit.exe /set nx AlwaysOn. I was forced to choose Restore to Original Dell setup (like a sys restore to day 1). What was my mistake?

  13. shriv

    Does this work with Windows 7 64 bit ?

  14. Kalle

    @shriv: Yes, it works. This script is great!

  15. santos

    how can you alter the script so it automaticaly adds the date and time as name for the restore point?

  16. santos

    never mind, figgured it out.

    GetObject(“winmgmts:\\.\root\default:Systemrestore”).CreateRestorePoint “”& Date &” ” & Time, 0, 100

  17. Alejandro

    The script at answers.microsoft.com… (http://goo.gl/uWOSr) has the additional function of displaying a message box when it’s done, very usefull
    Thanks

  18. Kavi Rama Murthy

    Alejandro’s link worked on win 7. Other scripts gave error messages.

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!