System Restore Script --- Will this work

R

Robert McEvoy

Quickly reset all the System Restore points (Windows XP)

--------------------------------------------------------------------------------

The following script (from MSDN - slightly modified) can be used to clear
the System Restore points quickly. It automatically disables System Restore,
clears all the Restore points and re-enables System Restore on all drives.
Copy the following script to a notepad and save as "ResetSR.VBS".

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer &
"\root\default")
Set objItem = objWMIService.Get("SystemRestore")
errResults = objItem.Disable("")
errResults = objItem.Enable("")


The above is an equivalent of selecting Turn Off System Restore on all
drives (which clears all the Restore points) and the last line in the script
re-enables the System Restore points.


--------------------------------------------------------------------------------
 
J

James Silverton

Hello, Robert!
You wrote on Sat, 27 Jan 2007 20:36:46 -0500:

RM> -----------------------------------------------------------

RM> The following script (from MSDN - slightly modified) can be
RM> used to clear the System Restore points quickly. It
RM> automatically disables System Restore, clears all the
RM> Restore points and re-enables System Restore on all drives.
RM> Copy the following script to a notepad and save as
RM> "ResetSR.VBS".

RM> strComputer = "."
RM> Set objWMIService = GetObject("winmgmts:\\" &
RM> strComputer & "\root\default")
RM> Set objItem = objWMIService.Get("SystemRestore")
RM> errResults = objItem.Disable("")
RM> errResults = objItem.Enable("")

RM> The above is an equivalent of selecting Turn Off System
RM> Restore on all drives (which clears all the Restore points)
RM> and the last line in the script re-enables the System
RM> Restore points.

I wonder why you'd want the script or even to do it? It's no big
thing to go into the monitoring settings and change them;
Microsoft sometimes does it whether you want to not during
so-called security updates!

James Silverton
Potomac, Maryland

E-mail, with obvious alterations:
not.jim.silverton.at.comcast.not
 
R

Robert McEvoy

I am trying to find out if I am creating any system restore checkpoints
I can not get the restore to work , so I would to know if any are being
created
I have found nothing in the event log
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top