I would like for all my Windows 7 System Restore options to be diabled when I install from the K2000.

Does anyone have a slick way to do this?

Please advise...

Bob Frakes
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Answers

0
Hey Bfrakes,

Try this batch script as a post installation task.

When your done make sure you also add it to your scripted install / image.

REG.EXE ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v DisableSR /t REG_DWORD /d 1 /f
Answered 10/06/2010 by: dchristian
Red Belt

Please log in to comment
0
Thanks, I'll try it on my next test install

Jedi
Answered 10/06/2010 by: bfrakes
Purple Belt

Please log in to comment
0
That didn't work.

I read on Google that this key is for WIndows XP. I'm going to have to look the hook in the Registry that does this.
Answered 10/07/2010 by: bfrakes
Purple Belt

Please log in to comment
0
You are correct sir that is the script for Win XP.

Try this one for win 7.

Save it as a .VBS.

Then upload it to the K2000 as a postinstall task.

The command line to run will be

cscript {name_of_file_here}.vbs

Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."

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

strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\SPP\Clients"
oReg.DeleteKey HKEY_LOCAL_MACHINE, strKeyPath

strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore"
strValueName = "RPSessionInterval"
dwValue = 0

oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue



Let me know if that works for you.
Answered 10/07/2010 by: dchristian
Red Belt

Please log in to comment
0
Worked like a champ

Thanks...

Jedi
Answered 10/07/2010 by: bfrakes
Purple Belt

Please log in to comment
0
Glad to hear it!
Answered 10/07/2010 by: dchristian
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity

Share