Windows 10: .REG vs .BAT Solved


  1. Posts : 163
    Windows 10 Enterprise x64 1709
       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 ComputerSystem Spec


  2. Posts : 3,204
    10.5 Home 1803 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 ComputerSystem Spec


  3. Posts : 163
    Windows 10 Enterprise x64 1709
    Thread Starter
       02 Sep 2015 #3

    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 15:53.
Find Us