Skip to content

Commit

Permalink
Refactor registry key writing (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
gyk4j authored May 14, 2024
1 parent 8692dc9 commit 4d4aa33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
19 changes: 6 additions & 13 deletions chcl3.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,12 @@ for /f %%A IN (data\files.txt) DO (
)
echo.

echo # Disabling Customer Experience Improvement Program (CEIP)...
REG ADD "HKLM\SOFTWARE\Microsoft\SQMClient\Windows" /v CEIPEnable /t REG_DWORD /d 0 /f
echo.

echo # Disabling Windows Error Reporting...
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d 1 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting" /v DontShowUI /t REG_DWORD /d 1 /f
echo.

echo # Disabling Windows Updates...
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v AUOptions /t REG_DWORD /d 1 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v IncludeRecommendedUpdates /t REG_DWORD /d 0 /f
REG ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v ElevateNonAdmins /t REG_DWORD /d 0 /f
echo # Updating registry key values...
for /f "delims=, tokens=1,2,3,4" %%A IN (data\registry.txt) DO (
ECHO [%%A]
ECHO %%B = %%D [%%C]
REG ADD "%%A" /v %%B /t %%C /d %%D /f
)
echo.

echo # Disabling scheduled tasks...
Expand Down
6 changes: 6 additions & 0 deletions data/registry.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
HKLM\SOFTWARE\Microsoft\SQMClient\Windows,CEIPEnable,REG_DWORD,0
HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting,Disabled,REG_DWORD,1
HKLM\SOFTWARE\Microsoft\Windows\Windows Error Reporting,DontShowUI,REG_DWORD,1
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update,AUOptions,REG_DWORD,1
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update,IncludeRecommendedUpdates,REG_DWORD,0
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update,ElevateNonAdmins,REG_DWORD,0

0 comments on commit 4d4aa33

Please sign in to comment.