System Restore when log on

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone knows how to write a script or any third party product that can
schedule system restore run and restore the computer to a specified restore
point whenever a user logon to the system. The reason is we need to restore
our internet cafe machine to original state after it's used to make sure no
virus, no spyware ... was installed on the machine
 
Ted Li said:
Does anyone knows how to write a script or any third party product that
can
schedule system restore run and restore the computer to a specified
restore
point whenever a user logon to the system. The reason is we need to
restore
our internet cafe machine to original state after it's used to make sure
no
virus, no spyware ... was installed on the machine


http://www.faronics.com/html/deepfreeze.asp

Rob
 
Hi Ted,

Previously posted by: Ramesh Srinivasan, Microsoft MVP [Windows XP
Shell/User]

Using Windows Scripting / WMI.

Restore Method of the SystemRestore Class:
http://windowssdk.msdn.microsoft.com/en-us/library/ms723713.aspx

"Initiates a system restore. The caller must force a system reboot. The
actual restoration occurs during the reboot"

You want to provide a Sequence number of the restore point, which can
also
be retrieved using enumeration.

Print the list of all available System Restore points to a file:
http://windowsxp.mvps.org/listsr.htm
 
Thanks a lot. This is what I'm looking after. This software is so great.

Ted
 
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 said:
Hi Ted,

Previously posted by: Ramesh Srinivasan, Microsoft MVP [Windows XP
Shell/User]

Using Windows Scripting / WMI.

Restore Method of the SystemRestore Class:
http://windowssdk.msdn.microsoft.com/en-us/library/ms723713.aspx

"Initiates a system restore. The caller must force a system reboot. The
actual restoration occurs during the reboot"

You want to provide a Sequence number of the restore point, which can
also
be retrieved using enumeration.

Print the list of all available System Restore points to a file:
http://windowsxp.mvps.org/listsr.htm

--
Regards,
Bert Kinney MS-MVP Shell/User
http://bertk.mvps.org
Member: http://dts-l.org

Does anyone knows how to write a script or any third party product
that can
schedule system restore run and restore the computer to a specified
restore
point whenever a user logon to the system. The reason is we need to
restore
our internet cafe machine to original state after it's used to make
sure no
virus, no spyware ... was installed on the machine
 
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


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

:
 
Not yet, Bert. Thanks for the idea :)

--
Regards,

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


Hi Ramesh,

Do you have a web page on this? <hint>
 

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

Back
Top