1. Joined : Aug 2015
    Posts : 92
    Windows 10 Enterprise x64
       02 Sep 2015 #1

    .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 System SpecsSystem Spec


  2. Joined : Oct 2014
    Trnava
    Posts : 1,711
    Windows Home x64
       02 Sep 2015 #2

    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 System SpecsSystem Spec


  3. Joined : Aug 2015
    Posts : 92
    Windows 10 Enterprise x64
       02 Sep 2015 #3

    Thanks Buddy
      My System SpecsSystem 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 06:03.
Find Us
Twitter Facebook Google+



Windows 10 Forums