split registeries edit into a separate file
This commit is contained in:
parent
44c4b8a41e
commit
83a419c5b7
3 changed files with 106 additions and 91 deletions
1
Makefile
1
Makefile
|
@ -203,6 +203,7 @@ sync-windows:
|
|||
@$(WGET) $(REPO_SRC)/windows/fix_nvidia_wsl.bat -O $(WIN_HOME)/Documents/Local/fix_nvidia_wsl.bat
|
||||
@$(WGET) $(REPO_SRC)/windows/fix_mihoyo_shortcut.bat -O $(WIN_HOME)/Documents/Local/fix_mihoyo_shortcut.bat
|
||||
@$(WGET) $(REPO_SRC)/windows/start_obs_as_shadowplay.bat -O $(LOCALAPPDATA)/start_obs_as_shadowplay.bat
|
||||
@$(WGET) $(REPO_SRC)/windows/reg_fixes.bat -O $(WIN_HOME)/Documents/Local/reg_fixes.bat
|
||||
@echo "$(WIN) Scripts synced!"
|
||||
@echo
|
||||
|
||||
|
|
103
windows/reg_fixes.bat
Normal file
103
windows/reg_fixes.bat
Normal file
|
@ -0,0 +1,103 @@
|
|||
@ECHO OFF
|
||||
|
||||
:: Start as administrator
|
||||
fltmc >NUL 2>&1 || (
|
||||
PowerShell Start -Verb RunAs '%0' 2>NUL || (
|
||||
EXIT 1
|
||||
)
|
||||
EXIT 0
|
||||
)
|
||||
|
||||
|
||||
ECHO Registery entries...
|
||||
|
||||
|
||||
:: Disabling widgets
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disabling hibernation (prevents computer to really shutdown)
|
||||
REG ADD "HKLM\System\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f
|
||||
powercfg /H off
|
||||
|
||||
:: Disabling the SysMain service (preload some apps in memory)
|
||||
sc stop "SysMain" & sc config "SysMain" start=disabled
|
||||
|
||||
:: Added confirmation when trashing
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ConfirmFileDelete /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Don't create Zone:Identifier
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v SaveZoneInformation /t REG_DWORD /d 2 /f
|
||||
|
||||
:: Disables VBS
|
||||
:: see https://support.microsoft.com/en-us/windows/options-to-optimize-gaming-performance-in-windows-11-a255f612-2949-4373-a566-ff6f3f474613
|
||||
REG ADD "HKLM\System\CurrentControlSet\Control\DeviceGuard" /v EnableVirtualizationBasedSecurity /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disables sticky keys
|
||||
REG ADD "HKCU\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 506 /f
|
||||
|
||||
:: Remove default shortcuts for changing input language and keyboard layout
|
||||
:: WIN+Space still available
|
||||
REG ADD "HKCU\Keyboard Layout\toggle" /v "Hotkey" /t REG_SZ /d 3 /f
|
||||
REG ADD "HKCU\Keyboard Layout\toggle" /v "Language Hotkey" /t REG_SZ /d 3 /f
|
||||
|
||||
:: Disable Game Bar
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v AppCaptureEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\System\GameConfigStore" /v GameDVR_Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Edge tweaks
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Edge" /v HubsSidebarEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Edge" /v ShowRecommendationsEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Edge" /v SpotlightExperiencesAndRecommendationsEnabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable Windows Copilot
|
||||
REG ADD "HKCU\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable checkboxes in explorer
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v AutoCheckSelect /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Set "This PC" default window when opening explorer
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LaunchTo /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Show file extension
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Show hidden files
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable web search in start menu
|
||||
REG ADD "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v DisableSearchBoxSuggestions /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable ad in file explorer
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSyncProviderNotifications /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable ad in login screen
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v RotatingLockScreenOverlayEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-338387Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable ad in settings and notifications
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-338393Enabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-353694Enabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-353696Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable ad at boot
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement" /v ScoobeSystemSettingEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-310093Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable targeted ad
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Privacy" /v TailoredExperiencesWithDiagnosticDataEnabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable ad in start menu
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_IrisRecommendations /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable HAGS
|
||||
:: see https://obsproject.com/wiki/How-to-disable-Windows-10-Hardware-GPU-Scheduler
|
||||
REG ADD "HKLM\System\CurrentControlSet\Control\GraphicsDrivers" /v HwSchMode /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable automatic reboot after update
|
||||
REM Is this working?
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f
|
||||
|
||||
|
||||
IF NOT "%1"=="yes" PAUSE
|
||||
EXIT /B
|
|
@ -27,6 +27,7 @@ fltmc >NUL 2>&1 || (
|
|||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_nvidia_wsl.bat -OutFile '!local!\fix_nvidia_wsl.bat'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/fix_mihoyo_shortcut.bat -OutFile '!local!\fix_mihoyo_shortcut.bat'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/start_obs_as_shadowplay.bat -OutFile '%LOCALAPPDATA%\start_obs_as_shadowplay.bat'"
|
||||
PowerShell -Command "Invoke-WebRequest -Uri !repo!/windows/reg_fixes.bat -OutFile '!local!\reg_fixes.bat'"
|
||||
|
||||
|
||||
:: === Install Spotify ==
|
||||
|
@ -55,97 +56,7 @@ IF NOT "%1"=="noskipadmin" (
|
|||
)
|
||||
|
||||
:: === Registery modifications ==
|
||||
ECHO Registery entries...
|
||||
:: Disabling widgets
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Dsh" /v AllowNewsAndInterests /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disabling hibernation (prevents computer to really shutdown)
|
||||
REG ADD "HKLM\System\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d 0 /f
|
||||
powercfg /H off
|
||||
|
||||
:: Disabling the SysMain service (preload some apps in memory)
|
||||
sc stop "SysMain" & sc config "SysMain" start=disabled
|
||||
|
||||
:: Added confirmation when trashing
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v ConfirmFileDelete /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Don't create Zone:Identifier
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v SaveZoneInformation /t REG_DWORD /d 2 /f
|
||||
|
||||
:: Disables VBS
|
||||
:: see https://support.microsoft.com/en-us/windows/options-to-optimize-gaming-performance-in-windows-11-a255f612-2949-4373-a566-ff6f3f474613
|
||||
REG ADD "HKLM\System\CurrentControlSet\Control\DeviceGuard" /v EnableVirtualizationBasedSecurity /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disables sticky keys
|
||||
REG ADD "HKCU\Control Panel\Accessibility\StickyKeys" /v Flags /t REG_SZ /d 506 /f
|
||||
|
||||
:: Remove default shortcuts for changing input language and keyboard layout
|
||||
:: WIN+Space still available
|
||||
REG ADD "HKCU\Keyboard Layout\toggle" /v "Hotkey" /t REG_SZ /d 3 /f
|
||||
REG ADD "HKCU\Keyboard Layout\toggle" /v "Language Hotkey" /t REG_SZ /d 3 /f
|
||||
|
||||
:: Disable Game Bar
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v AppCaptureEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\System\GameConfigStore" /v GameDVR_Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Edge tweaks
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Edge" /v HubsSidebarEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Edge" /v ShowRecommendationsEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Edge" /v SpotlightExperiencesAndRecommendationsEnabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable Windows Copilot
|
||||
REG ADD "HKCU\Software\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable checkboxes in explorer
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v AutoCheckSelect /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Set "This PC" default window when opening explorer
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v LaunchTo /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Show file extension
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v HideFileExt /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Show hidden files
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Hidden /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable web search in start menu
|
||||
REG ADD "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v DisableSearchBoxSuggestions /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable ad in file explorer
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v ShowSyncProviderNotifications /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable ad in login screen
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v RotatingLockScreenOverlayEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-338387Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable ad in settings and notifications
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-338393Enabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-353694Enabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-353696Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable ad at boot
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\UserProfileEngagement" /v ScoobeSystemSettingEnabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v SubscribedContent-310093Enabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable targeted ad
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Privacy" /v TailoredExperiencesWithDiagnosticDataEnabled /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable ad in start menu
|
||||
REG ADD "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v Start_IrisRecommendations /t REG_DWORD /d 0 /f
|
||||
|
||||
:: Disable HAGS
|
||||
:: see https://obsproject.com/wiki/How-to-disable-Windows-10-Hardware-GPU-Scheduler
|
||||
REG ADD "HKLM\System\CurrentControlSet\Control\GraphicsDrivers" /v HwSchMode /t REG_DWORD /d 1 /f
|
||||
|
||||
:: Disable automatic reboot after update
|
||||
REM Is this working?
|
||||
REG ADD "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f
|
||||
|
||||
|
||||
:: === Firewall rules ==
|
||||
:: Disable Edge updates
|
||||
netsh advfirewall firewall add rule name="Disable Microsoft Edge automatic updates" dir=out program="%ProgramFiles(x86)%\Microsoft\EdgeUpdate\MicrosoftEdgeUpdate.exe" action=block
|
||||
CMD /c "!local!\reg_fixes.bat" yes
|
||||
|
||||
|
||||
:: === Install optional features ==
|
||||
|
|
Loading…
Reference in a new issue