Jump to content

Recommended Posts

Posted

Hi,

I would like to turn off system restore on c drive since it is ON by default on windows 7.

I have tried the following 2 vbs script found in the net

script 1 ------------------------------

strComputer = "."

Set objWMIService = GetObject("winmgmts:" _

& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\default")

Set objItem = objWMIService.Get("SystemRestore")

errResults = objItem.Disable("C:\")

script 2 ------------------------------

Dim SRP, eSRP

Set SRP = GetObject("winmgmts:\\.\root\default:SystemRestore")

eSRP = SRP.disable("C:\")

However, when i click control panel -- system -- advance system settings -- system protection -- c drive is still show "ON"

Please advice and thank you.

post-31401-0-10543800-1313098809_thumb.j


Posted

Powershell to disable System Restore on C: drive.

disable-computerrestore "C:\"

Hi owl,

Thank for the reply ...

I tried your suggestion and run the script but when i check system protection the

c drive is still "ON".

Posted

I tried your suggestion and run the script but when i check system protection the c drive is still "ON".

Did you run powershell elevated? You need to do that to change these kinds of settings on your computer. Otherwise, did you get an error message of any kind? Because that's a standard, built-in cmdlet to do it so I'd be surprised if it didn't work.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...