Can someone make me a SR script?

R

RScotti

Hi,
I would like to hire someone that could make me some kind of script/Bat file that I could use in the Scheduled Tasks to
have System Restore create a restore point every 12 hours since I can't do this with the shipped task the MS has in
there.

I had on that was available in XP but it won't work with Vista. It was called SysRestorePoint.exe there was also one
called XPSystemRestore.vbs


I am on a fixed income but will try to meet your price if reasonable. I know MS will do it for about $145.00 and that is
way out of my price range.

Thanks.

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

RScotti

Hi,
PS:
I did get this message from Jon here the other day but don't know how to use it.


Shadow Copy - Can I configure how often?
http://groups.google.com/group/micr...default:SystemRestore&rnum=1#eaef5e654c993d83

Actually the code needs to be modified slightly, to be able to be used as an
automatic task. The following pasted into a .vbs file, and then scheduled
using Task Scheduler, should do the trick.

NB
-You'd need to set it to 'Run with highest privileges' (General tab)
-Schedule it using an administrator level account (General tab)
-Set it to run 'only when a user is logged on' (General tab)
-Uncheck the 'Start the task only if idle..(Conditions tab)

'--------------------------------------------------
RpName = "Scripted Restore Point"
CreateARestorePoint RpName


Function CreateARestorePoint(fn_RPName)

Set SRobj =
GetObject("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore")

'Restore Point Type
Const MODIFY_SETTINGS = 12

'Event Type
Const BEGIN_SYSTEM_CHANGE = 100


SRobj.CreateRestorePoint fn_RPName, MODIFY_SETTINGS, BEGIN_SYSTEM_CHANGE


End Function


'--------------------------------------------------
NB This should all be one long line

Set SRobj =
GetObject("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore")



Hi,
I would like to hire someone that could make me some kind of script/Bat file that I could use in the Scheduled Tasks to
have System Restore create a restore point every 12 hours since I can't do this with the shipped task the MS has in
there.

I had on that was available in XP but it won't work with Vista. It was called SysRestorePoint.exe there was also one
called XPSystemRestore.vbs


I am on a fixed income but will try to meet your price if reasonable. I know MS will do it for about $145.00 and that is
way out of my price range.

Thanks.

Have a good day,
RScotti

remove "nospam" in order to email me.

Have a good day,
RScotti

remove "nospam" in order to email me.
 
A

adam

Microsoft has scripting resources online. copy this code into a text file
and save as vbs. Then you can run it via scheduled tasks. No need to pay
someone, this stuff is usually available online somewhere.



' Create a System Restore Point

' Windows Server 2003 : No
' Windows XP : Yes
' Windows 2000 : No
' Windows NT 4.0 : No
' Windows 98 : No

CONST DEVICE_DRIVER_INSTALL = 10
CONST BEGIN_SYSTEM_CHANGE = 100

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")

Set objItem = objWMIService.Get("SystemRestore")
errResults = objItem.CreateRestorePoint _
("Scripted restore", DEVICE_DRIVER_INSTALL, BEGIN_SYSTEM_CHANGE)
 
R

RScotti

Hi Adam,
Thanks I really appreciate this you don't know how much aggravation I have been going through to find someone like You.

I will do as you said but it doesn't mention Vista only XP?
Is that right?

Microsoft has scripting resources online. copy this code into a text file
and save as vbs. Then you can run it via scheduled tasks. No need to pay
someone, this stuff is usually available online somewhere.



' Create a System Restore Point

' Windows Server 2003 : No
' Windows XP : Yes
' Windows 2000 : No
' Windows NT 4.0 : No
' Windows 98 : No

CONST DEVICE_DRIVER_INSTALL = 10
CONST BEGIN_SYSTEM_CHANGE = 100

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")

Set objItem = objWMIService.Get("SystemRestore")
errResults = objItem.CreateRestorePoint _
("Scripted restore", DEVICE_DRIVER_INSTALL, BEGIN_SYSTEM_CHANGE)

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

RScotti

Hi Adam,
I got an error it says

C:\sr.vbs
line: 17
Char: 1
Error: Access denied
code: 80041003
Source: SWbermObjectEx

Is this because I have to run from a elevated CMD?



Microsoft has scripting resources online. copy this code into a text file
and save as vbs. Then you can run it via scheduled tasks. No need to pay
someone, this stuff is usually available online somewhere.



' Create a System Restore Point

' Windows Server 2003 : No
' Windows XP : Yes
' Windows 2000 : No
' Windows NT 4.0 : No
' Windows 98 : No

CONST DEVICE_DRIVER_INSTALL = 10
CONST BEGIN_SYSTEM_CHANGE = 100

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")

Set objItem = objWMIService.Get("SystemRestore")
errResults = objItem.CreateRestorePoint _
("Scripted restore", DEVICE_DRIVER_INSTALL, BEGIN_SYSTEM_CHANGE)

Have a good day,
RScotti

remove "nospam" in order to email me.
 
R

RScotti

Adam,
I did that from the elevated command and it worked.
You don't know how much you helped me. I can never thank you enough.



Hi Adam,
I got an error it says

C:\sr.vbs
line: 17
Char: 1
Error: Access denied
code: 80041003
Source: SWbermObjectEx

Is this because I have to run from a elevated CMD?





Have a good day,
RScotti

remove "nospam" in order to email me.

Have a good day,
RScotti

remove "nospam" in order to email me.
 
P

Peter Foldes

Go to this newsgroup below and that script has been posted there numerous times

news://msnews.microsoft.com/microsoft.public.windows.server.scripting
 
R

RScotti

Thanks,
I didn't think even of that N/G. I guess I am not too bright.:(
I ran it like Adam said and it did work on a manual run. Now I have it setup to run in the tasks at 12 AM.

That's when I will know for sure cause I could have the options wrong in the create a task?

Go to this newsgroup below and that script has been posted there numerous times

news://msnews.microsoft.com/microsoft.public.windows.server.scripting

Have a good day,
RScotti

remove "nospam" in order to email me.
 

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