Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 



maniG

Member
  • Content count

    3
  • Donations

    $0.00 
  • Joined

  • Last visited

Community Reputation

0 Neutral

About maniG

Profile Information

  • OS
    Windows 10 x64
  • Country
  1. That seems to be a good way to check. So far what I have done is my script will attempt to create a restore point and in case of error it will call a function that will enable protection and then again create a restore point or will exit in case of success. Thank you for your help.
  2. Hey thankyou for the answer. I have made changes to the code. Basically before we create a restore point, system restore must be enabled and I wanted to know a way to check if it is enabled or not.
  3. I am using the following code in my visual basic script to enable system protection in windows 10 and it works perfectly fine. I am looking for a visual basic code that checks if protection on particular drive is enabled or not? and Sets Max usage to 15%. If Not WScript.Arguments.Named.Exists("elevate") Then CreateObject("Shell.Application").ShellExecute WScript.FullName _ , WScript.ScriptFullName & " /elevate", "", "runas", 1 WScript.Quit End If Dim oSR Set oSR = GetObject("winmgmts:{impersonationLevel=impersonate}!root/default:SystemRestore") oSR.Enable("C:" & "\") If someone can highlight the version of windows this code is compatible for, that would be great.
×