1.    02 Sep 2015 #1
    Join Date : Aug 2015
    Posts : 152
    Windows 10 Enterprise x64 1709

    .REG vs .BAT


    Howdy,
    Strange behavior!
    I set the following 2 registry keys via both .reg and .bat file in Windows 10 to control System Protection.
    I don't care if they work or not and if this is the key to work on or not.
    .bat file works but .reg file not!
    Spent sometime and just confused, anyone have a clue?

    =====
    .bat file
    =====
    'Turn off System Protection
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore" /v RPSessionInterval /t REG_DWORD /d 0 /f
    'Set 1%
    REG ADD "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg" /v DiskPercent /t REG_DWORD /d 1 /f

    =====
    .reg file
    =====
    'Turn off System Protection
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore]
    RPSessionInterval=dword:00000000
    'Set 1%
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg]
    DiskPercent=dword:00000001

    Why .reg file is not working as I must use the .reg file?
    Thanks.
      My ComputerSystem Spec
  2.    02 Sep 2015 #2
    Join Date : Oct 2014
    Trnava
    Posts : 2,983
    10.4 Home 1709 x64

    If you are at loss, just export the key from registry, maybe you have forgotten to add the top?

    Windows Registry Editor Version 5.00

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore]
    "RPSessionInterval"=dword:00000000

    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg]
    "DiskPercent"=dword:00000001
      My ComputerSystem Spec
  3.    02 Sep 2015 #3
    Join Date : Aug 2015
    Posts : 152
    Windows 10 Enterprise x64 1709
    Thread Starter

    Thanks Buddy
      My ComputerSystem Spec

 

Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 11:50.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App



Windows 10 Forums