/build/static/layout/Breadcrumb_cap_w.png

Disable System Restore in W7

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

Answers (6)

Posted by: dchristian 14 years ago
Red Belt
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
Posted by: bfrakes 14 years ago
Purple Belt
0
Thanks, I'll try it on my next test install

Jedi
Posted by: bfrakes 14 years ago
Purple Belt
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.
Posted by: dchristian 14 years ago
Red Belt
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.
Posted by: bfrakes 14 years ago
Purple Belt
0
Worked like a champ

Thanks...

Jedi
Posted by: dchristian 14 years ago
Red Belt
0
Glad to hear it!
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ