Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion System Restore when log on

View parsed - Show only message text

From: "Ramesh, MS-MVP" <ram...@XOX.mvps.org>
References:  <A27191C5-BE3A-45B2-88C9-4B54D011ED64@microsoft.com> <uBjkOUXzGHA.480@TK2MSFTNGP06.phx.gbl> <76264553-C9CC-4BDC-B0B7-5135224CC70D@microsoft.com>
Subject: Re: System Restore when log on
Date: Sun, 3 Sep 2006 15:31:15 +0530
Lines: 45
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
Message-ID: <OsZ#e$zzGHA.4796@TK2MSFTNGP06.phx.gbl>
Newsgroups: microsoft.public.windowsxp.help_and_support
NNTP-Posting-Host: 59.92.35.46
Path: g2news2.google.com!news4.google.com!newshub.sdsu.edu!msrtrans!TK2MSFTFEEDS01.phx.gbl!TK2MSFTNGP01.phx.gbl!TK2MSFTNGP06.phx.gbl

Ted,

It looks like you've found a third-party alternative. Anyway, I'm posting a 
sample script which will rollback the system to a specific system restore 
point (sequence id mentioned).

- - -
Set Args = wscript.Arguments
RpNum = 156 'This is the Sequence ID
Set obj = 
GetObject("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore")
if obj.Restore(RpNum) <> 0 Then
    wscript.Echo "Restore failed"
End If
Set OpSysSet = 
GetObject("winmgmts:{(Shutdown)}//./root/cimv2").ExecQuery("select * from 
Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
    OpSys.Reboot()
next
- - -

Paste the contents to Notepad, and save it with .vbs extension (example, 
"restore_156.vbs") and run the file. It will reboot once, and System Restore 
rollback takes place on the next startup.

-- 
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


"Ted Li" <Te...@discussions.microsoft.com> wrote in message 
news:76264553-C9CC-4BDC-B0B7-5135224CC70D@microsoft.com...
The script for "list of sequence of restore point" works fine, but the 
script
for "initiate system restore" is confusing, I can't make it work. Any idea?

Ted

"Bert Kinney" wrote:




Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google