Skip to content

Instantly share code, notes, and snippets.

@kanchudeep
Last active August 28, 2024 12:58
Show Gist options
  • Save kanchudeep/8a1f4889b2509fcea9643240f2d2c53d to your computer and use it in GitHub Desktop.
Save kanchudeep/8a1f4889b2509fcea9643240f2d2c53d to your computer and use it in GitHub Desktop.
:: Script to customise Windows 10 x64 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
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 Menu...
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.
:: TODO Check
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.
:: 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 Set Explorer to show extensions, show 'List view' and sort by extension...
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /f /v HideFileExt /t REG_DWORD /d 0
reg delete "HKCU\Software\Microsoft\Windows\Shell\BagMRU" /f
reg delete "HKCU\Software\Microsoft\Windows\Shell\Bags" /f
reg delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\Bags" /f
reg delete "HKCU\Software\Microsoft\Windows\ShellNoRoam\BagMRU" /f
reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /f
reg delete "HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags" /f
reg delete "HKCU\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\Bags" /f
reg delete "HKCU\Software\Classes\Wow6432Node\Local Settings\Software\Microsoft\Windows\Shell\BagMRU" /f
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams /f /v Settings /t REG_BINARY /d 080000000300000001000000E0A51F0E7335CF11AE6908002B2E1262040000001400000043000000
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults /f /v {5C4F28B5-F869-4E84-8E60-F11DB97C5CC7} /t REG_BINARY /d 1c000000000000000000000000000000000000000000000000000000f1f1f1f114000000000000000000000000000000e8020000e40200003153505305d5cdd59c2e1b10939708002b2cf9ae830000002200000000470072006f0075007000420079004b00650079003a0046004d005400490044000000080000004e0000007b00300030003000300030003000300030002d0030003000300030002d0030003000300030002d0030003000300030002d003000300030003000300030003000300030003000300030007d0000000000330000002200000000470072006f00750070004200790044006900720065006300740069006f006e0000001300000001000000730000000a0000000053006f00720074000000420000001e000000700072006f007000340032003900340039003600370032003900350000000000340000000200000030f125b7ef471a10a5f102608c9eebac040000000100000030f125b7ef471a10a5f102608c9eebac0a00000001000000250000001400000000470072006f0075007000560069006500770000000b000000000000001b0000000a000000004d006f006400650000001300000003000000230000001200000000490063006f006e00530069007a00650000001300000010000000bd000000100000000043006f006c0049006e0066006f000000420000001e000000700072006f00700034003200390034003900360037003200390035000000000078000000fddfdffd100000000000000000000000040000001800000030f125b7ef471a10a5f102608c9eebac0a0000001001000030f125b7ef471a10a5f102608c9eebac0e0000009000000030f125b7ef471a10a5f102608c9eebac040000007800000030f125b7ef471a10a5f102608c9eebac0c000000500000002f0000001e00000000470072006f0075007000420079004b00650079003a00500049004400000013000000000000001f0000000e00000000460046006c00610067007300000013000000010020413100000020000000004c006f0067006900630061006c0056006900650077004d006f0064006500000013000000040000000000000000000000
echo.
echo Disable 'Replace Commant Prompt with Windows PowerShell in menu/Win+X'...
reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced /f /v DontUsePowerShellOnWinX /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
reg delete HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} /f
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
echo.
pause
:: Manual tweaks:
:: Enable 'Open command window here' in right-click context menu:
:: In registry navigate to 'HKEY_CLASSES_ROOT\Directory\shell\cmd'
:: Change ownership to 'Administrators' and allow 'Full Control' for 'Administrators'
:: Rename the key 'HideBasedOnVelocityId' to 'ShowBasedOnVelocityId'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment