Skip to content

Instantly share code, notes, and snippets.

@kanchudeep
Created December 31, 2023 01:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kanchudeep/ff1c5b2383fec89e5887e4e7ede92d0d to your computer and use it in GitHub Desktop.
Save kanchudeep/ff1c5b2383fec89e5887e4e7ede92d0d to your computer and use it in GitHub Desktop.
Batch file to customise Windows 10 22H2
:: Script to customise Windows 10 22H2
@echo off
:: System related
echo Setting 'Notify before downloading and installing any updates' for Windows Updates...
reg add HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU /f /v AUOptions /t REG_DWORD /d 2
echo.
echo Unistalling Edge...
"%PROGRAMFILES(X86)%\Microsoft\Edge\Application\92.0.902.67\Installer\"setup.exe --uninstall --system-level --verbose-logging --force-uninstall --delete-profile
echo Disable future updates to Edge...
reg add HKLM\Software\Microsoft\EdgeUpdate /f /v DoNotUpdateToEdgeWithChromium /t REG_DWORD /d 1
echo.
echo Unistalling OneDrive...
%SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
:: 32-bit
:: %SystemRoot%\System32\OneDriveSetup.exe /uninstall
echo.
echo Disabling Telemetry...
reg delete HKCU\Software\Policies\Microsoft\Windows\DataCollection /f /va
reg add "HKCU\Software\Policies\Microsoft\Assistance\Client\1.0" /f /v NoExplicitFeedback /t REG_DWORD /d 1
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection /f /v AllowTelemetry /t REG_DWORD /d 0
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\ClientTelemetry" /f /v DontRetryOnError /t REG_DWORD /d 1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\ClientTelemetry" /f /v IsCensusDisabled /t REG_DWORD /d 1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\ClientTelemetry" /f /v TaskEnableRun /t REG_DWORD /d 1
reg add HKLM\Software\Policies\Microsoft\Windows\AppCompat /f /v AITEnable /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Microsoft\Windows\DataCollection /f /v AllowDesktopAnalyticsProcessing /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Microsoft\Windows\DataCollection /f /v AllowDeviceNameInTelemetry /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Microsoft\Windows\DataCollection /f /v AllowTelemetry /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Microsoft\Windows\DataCollection /f /v AllowUpdateComplianceProcessing /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Microsoft\Windows\DataCollection /f /v AllowWUfBCloudProcessing /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Microsoft\Windows\DataCollection /f /v DisableTelemetryOptInChangeNotification /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Microsoft\Windows\DataCollection /f /v DisableTelemetryOptInSettingsUx /t REG_DWORD /d 0
reg add HKLM\Software\Policies\Microsoft\Windows\DataCollection /f /v LimitEnhancedDiagnosticDataWindowsAnalytics /t REG_DWORD /d 1
reg add HKLM\System\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger /f /v Start /t REG_DWORD /d 0
echo.
echo Disabling Cortana...
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /f /v AllowCortana /t REG_DWORD /d 0
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /f /v DisableWebSearch /t REG_DWORD /d 1
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /f /v ConnectedSearchUseWeb /t REG_DWORD /d 0
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /f /v ConnectedSearchUseWebOverMeteredConnections /t REG_DWORD /d 0
echo.
echo Disable web search and app suggestions...
reg add HKCU\Microsoft\Windows\CurrentVersion\Search /f /v AllowSearchToUseLocation /t REG_DWORD /d 0
reg add HKCU\Microsoft\Windows\CurrentVersion\Search /f /v BingSearchEnabled /t REG_DWORD /d 0
reg add HKCU\Microsoft\Windows\CurrentVersion\Search /f /v CortanaConsent /t REG_DWORD /d 0
reg add HKCU\Microsoft\Windows\CurrentVersion\Search /f /v DeviceHistoryEnabled /t REG_DWORD /d 0
reg add HKCU\Microsoft\Windows\CurrentVersion\Search /f /v HistoryViewEnabled /t REG_DWORD /d 0
:: Remove Bing from Start Menu search
reg add HKCU\Software\Policies\Microsoft\Windows\Explorer /f /v DisableSearchBoxSuggestions /t REG_DWORD /d 1
:: Disable app suggestions on start...
reg add HKLM\Software\Policies\Microsoft\Windows\CloudContent /f /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1
echo.
echo Disabling Hibernate...
powercfg.exe /hibernate off
echo.
echo Setting to require Username and Password for UAC...
:: Disable 'Enumerate administrator accounts on elevation'...
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\CredUI\ /f /v EnumerateAdministrators /t REG_DWORD /d 0
:: Disable 'Allow UIAccess applications to prompt for elevation without using the secure desktop'...
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System\ /f /v EnableUIADesktopToggle /t REG_DWORD /d 0
echo.
echo Disable Thumbs.db on network drives...
reg add HKCU\Software\Policies\Microsoft\Windows\Explorer /f /v DisableThumbsDBOnNetworkFolders /t REG_DWORD /d 1
echo.
echo Disable Game Bar...
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\GameDVR /f /v AppCaptureEnabled /t REG_DWORD /d 0
echo.
echo Adding 'Open with Notepad' for all files...
reg add "HKCR\*\shell\Open with Notepad\Command" /f /d "notepad.exe %%1"
echo.
echo Setting user's full name...
net user deep /fullname:"Deep Pradhan"
echo.
:: Visual
echo Disabling Lock Screen...
reg add HKLM\Software\Policies\Microsoft\Windows\Personalization /f /v NoLockScreen /t REG_DWORD /d 1
echo.
echo Set Dark Theme and Transparancy...
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /f /v AppsUseLightTheme /t REG_DWORD /d 0
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /f /v SystemUsesLightTheme /t REG_DWORD /d 0
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize /f /v EnableTransparency /t REG_DWORD /d 1
:: Taskbar transparency...
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /f /v UseOLEDTaskbarTransparency /t REG_DWORD /d 1
echo.
echo Removing Meet Now icon...
reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer /f /v HideSCAMeetNow /t REG_DWORD /d 1
echo Remove '3D Objects' from Explorer...
reg delete HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} /f /va
reg delete HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} /f /va
echo.
echo Hide Search box on Taskbar...
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Search /f /v SearchboxTaskbarMode /t REG_DWORD /d 0
echo Disable 'When I snap a window, show what I can snap next to it'...
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /f /v SnapAssist /t REG_DWORD /d "0"
echo.
:: Restart Windows Explorer
taskkill /f /im explorer.exe
start explorer.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment