Rico.JohnnY Posted June 5, 2004 Posted June 5, 2004 How to achieve that during an unattended setup of winxp pro
neophyte Posted June 5, 2004 Posted June 5, 2004 Try using this VB script that another forum member here graciously helped me out with...Dim SRP, eSRPSet SRP = GetObject("winmgmts:\\.\root\default:SystemRestore")eSRP = SRP.disable("D:\")Replace "D:\" with whatever drive you wish to disable system restore on (you must also keep the quotes).You can also re-enable it by changing SRP.disable to SRP.enableYou can't use this during the actual installation process, but you can use it during GUIRUNONCE/EX.Just copy+paste it into notepad and save it with the .vbs extension (making sure not to save it as .vbs.txt)
maxXPsoft Posted June 5, 2004 Posted June 5, 2004 Or to search through all and turn off except CSave this asSysRestoreOff.vbsConst DriveTypeRemovable = 1Const DriveTypeFixed = 2Const DriveTypeNetwork = 3Const DriveTypeCDROM = 4Const DriveTypeRAMDisk = 5Set FSO = CreateObject("Scripting.FileSystemObject")Set Drives = FSO.DrivesFor each Drive in Drives If Drive.DriveType = 2 then If Drive = "C:" then Else Target Drive End if End ifNextSub Target(Drive) Dim SRP, eSRP Set SRP = GetObject("winmgmts:\\.\root\default:SystemRestore") eSRP = SRP.disable(Drive & "\") Set SRP = Nothing Set eSRP = NothingEnd SubSet FSO = NothingSet Drives = Nothing
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now