Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- REM Tweak Script for Windows 10 Enterprise N LTSB x64 en-US
- REM VERSION: 1.23 DATE LAST MODIFIED: 2015-08-19 CREATED BY: ERICGL
- REM During Win10 installation, select Customize Settings, and turn everything OFF.
- REM Also during Win10 installation, use a local account, not a Microsoft account. Click "Skip this step" at the bottom.
- REM
- REM WARNING!!
- REM BEFORE APPLYING ANY OF THE COMMANDS IN THIS SCRIPT,
- REM BACKUP YOUR ENTIRE REGISTRY TO A FILE!
- REM Open Regedit.exe > File > Export.
- REM Make sure "Export range" is set to All, give it an appropriate name and save in a convenient location.
- REM
- REM Download SetACL from here: https://helgeklein.com/downloads/SetACL/current/SetACL%20(executable%20version).zip
- REM NOTE: This app is required in order to give Administrators ownership of locked registry keys. Itβs perfectly safe to use.
- REM Extract SetACl.exe from the 64bit folder and rename it to SetACLx64.exe. Copy SetACLx64.exe to %SystemRoot%\System32 (Allow through UAC).
- REM
- REM Changes in registry do not reflect back to GPEDIT.MSC. Better to do it directly through GPEDIT.MSC UI.
- REM
- REM OK, LET'S BEGIN
- REM
- @echo off
- set SetACL=%SystemRoot%\System32\SetACLx64.exe
- set NoIP=127.0.0.0
- set AdminsGroup=Administrators
- set NewTemp=%SYSTEMDRIVE%\TEMP
- set NewDownloads=%SYSTEMDRIVE%\DOWNLOADS
- net session >nul 2>nul || (echo Run as administrator, please... &pause &exit /b)
- ver | findstr "10." || (echo Only for Windows 10... &pause)
- if not exist %SetACL% (echo Please setup SetACL... &pause &exit /b)
- REM *** change all Temp directories to C:\TEMP (environment variables) ***
- md %NewTemp%
- call :AddReg "HKU\.DEFAULT\Environment" "TEMP" REG_EXPAND_SZ %NewTemp%
- call :AddReg "HKU\.DEFAULT\Environment" "TMP" REG_EXPAND_SZ %NewTemp%
- call :AddReg "HKCU\Environment" "TEMP" REG_EXPAND_SZ %NewTemp%
- call :AddReg "HKCU\Environment" "TMP" REG_EXPAND_SZ %NewTemp%
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "TEMP" REG_EXPAND_SZ %NewTemp%
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "TMP" REG_EXPAND_SZ %NewTemp%
- call :DelDirForced "%USERPROFILE%\AppData\Local\Temp"
- call :DelDirForced "%SystemRoot%\Temp"
- REM *** Don't allow Windows 10 to repair itself from Windows Update (define alternate repair source, such as network location or WIM file) ***
- REM *** VERY RISKY!!! MAKE SURE YOU KNOW WHAT YOU'RE DOING .***
- REM *** Instead of Windows Update, I set it to use 0.0.0.0, which means it won't be able to find a repair source ***
- REM *** This setting is located at GPEDIT.MSC > Computer Configuration > Administrative Templates > System: Specify settings for optional installation and component repair ***
- REM *** If you prefer to use the GPEDIT.MSC UI, Enable the setting, type an alternate repair source and CHECK "Never attempt to download payload from Windows Update" ***
- REM *** Info source: https://technet.microsoft.com/en-us/library/hh825020.aspx#BKMK_Specify ***
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{7C0F6EBB-E44C-48D1-82A9-0561C4650831}Machine\Software\Microsoft\Windows\CurrentVersion\Policies\Servicing"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{7C0F6EBB-E44C-48D1-82A9-0561C4650831}Machine\Software\Microsoft\Windows\CurrentVersion\Policies\Servicing" "**del.RepairContentServerSource" REG_SZ " "
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{7C0F6EBB-E44C-48D1-82A9-0561C4650831}Machine\Software\Microsoft\Windows\CurrentVersion\Policies\Servicing" "LocalSourcePath" REG_EXPAND_SZ %NoIP%
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy Objects\{7C0F6EBB-E44C-48D1-82A9-0561C4650831}Machine\Software\Microsoft\Windows\CurrentVersion\Policies\Servicing" "UseWindowsUpdate" REG_DWORD 2
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing"
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing" "LocalSourcePath" REG_EXPAND_SZ %NoIP%
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Servicing" "UseWindowsUpdate" REG_DWORD 2
- REM *** Remove the Previous Versions tab, which appears when right-clicking a file > Properties ***
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer" "NoPreviousVersionsPage" REG_DWORD 1
- REM *** Disable Disk Quota tab, which appears as a tab when right-clicking on drive letter > Properties ***
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows NT\DiskQuota" "Enable" REG_DWORD 0
- REM *** Remove Application Telemetry - WINDOWS 7 ONLY!! ***
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\AIT" "AITEnable" REG_DWORD 0
- REM *** Remove Telemetry & Data Collection ***
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Device Metadata" PreventDeviceMetadataFromNetwork REG_DWORD 1
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\DataCollection" "AllowTelemetry" REG_DWORD 0
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Program-Telemetry" "Enabled" REG_DWORD 0
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\MRT" DontOfferThroughWUAU REG_DWORD 1
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\SQMClient\Windows" "CEIPEnable" REG_DWORD 0
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" "AITEnable" REG_DWORD 0
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\AppCompat" "DisableUAR" REG_DWORD 1
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" "AllowTelemetry" REG_DWORD 0
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" "Start" REG_DWORD 0
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger" "Start" REG_DWORD 0
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\TCPIPLOGGER" "Start" REG_DWORD 0
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\WMI\AutoLogger\ReadyBoot" "Start" REG_DWORD 0
- *** Don't allow Windows Defender to submit samples to MAPS (formerly SpyNet) ***
- REM Changes in registry do not reflect back to GPEDIT.MSC. Better to do it directly through GPEDIT.MSC UI.
- REM Or in this case through: Settings > Update & Security > Windows Defender
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows Defender\Spynet" "SpyNetReporting" REG_DWORD 0
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows Defender\Spynet" "SubmitSamplesConsent" REG_DWORD 0
- REM *** Set some IE11 settings. Pay Attention to Download folder location (change to your preferred location)!! ***
- md %NewDownloads%
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main" "Default Download Directory" REG_SZ "%NewDownloads%"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main" "DoNotTrack" REG_DWORD 1
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main" "Search Page" REG_SZ "http://www.google.com"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\Main" "Start Page Redirect Cache" REG_SZ "http://www.google.com/?noj=1"
- REM *** add Google as search provider for IE11, and make it the default ***
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes" "DefaultScope" REG_SZ "{89418666-DF74-4CAC-A2BD-B69FB4A0228A}"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "DisplayName" REG_SZ "Google"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "FaviconURL" REG_SZ "http://www.google.com/favicon.ico"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "FaviconURLFallback" REG_SZ "http://www.google.com/favicon.ico"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "OSDFileURL" REG_SZ "http://www.iegallery.com/en-us/AddOns/DownloadAddOn?resourceId=813"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "ShowSearchSuggestions" REG_DWORD 1
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "SuggestionsURL" REG_SZ "http://clients5.google.com/complete/search?q={searchTerms}&client=ie8&mw={ie:maxWidth}&sh={ie:sectionHeight}&rh={ie:rowHeight}&inputencoding={inputEncoding}&outputencoding={outputEncoding}"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "SuggestionsURLFallback" REG_SZ "http://clients5.google.com/complete/search?hl={language}&q={searchTerms}&client=ie8&inputencoding={inputEncoding}&outputencoding={outputEncoding}"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "TopResultURLFallback" REG_SZ ""
- call :AddReg "HKCU\SOFTWARE\Microsoft\Internet Explorer\SearchScopes\{89418666-DF74-4CAC-A2BD-B69FB4A0228A}" "URL" REG_SZ "http://www.google.com/search?q={searchTerms}&sourceid=ie7&rls=com.microsoft:{language}:{referrer:source}&ie={inputEncoding?}&oe={outputEncoding?}"
- REM *** Change how Windows Updates are delivered to you - allow only directly from Microsoft ***
- REM 0 = Off (only directly from Microsoft)
- REM 1 = Get updates from Microsoft and PCs on your local network
- REM 3 = Get updates from Microsoft, PCs on your local network & PCs on the Internet (like how torrents work)
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" "DODownloadMode" REG_DWORD 0
- REM *** Windows Update - Notify first (These settings are also available in GPEDIT.MSC) ***
- REM GPEDIT.MSC > Computer Configuration > Administrative Templates > Windows Components > Windows Update
- net stop wuauserv
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" "AutoInstallMinorUpdates" REG_DWORD 0
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" "AUOptions" REG_DWORD 2
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU" "NoAutoUpdate" REG_DWORD 0
- net start wuauserv
- REM *** Disable Cortana (Speech Search Assistant, which also sends information to Microsoft) ***
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" "CortanaEnabled" REG_DWORD 0
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\Windows Search" "AllowCortana" REG_DWORD 0
- REM *** Disable Cortana Telemetry ***
- rem call :AddReg "HKLM\COMPONENTS\DerivedData\Components\amd64_microsoft-windows-c..lemetry.lib.cortana_31bf3856ad364e35_10.0.10240.16384_none_40ba2ec3d03bceb0" "f!dss-winrt-telemetry.js" REG_DWORD 0
- rem call :AddReg "HKLM\COMPONENTS\DerivedData\Components\amd64_microsoft-windows-c..lemetry.lib.cortana_31bf3856ad364e35_10.0.10240.16384_none_40ba2ec3d03bceb0" "f!proactive-telemetry.js" REG_DWORD 0
- rem call :AddReg "HKLM\COMPONENTS\DerivedData\Components\amd64_microsoft-windows-c..lemetry.lib.cortana_31bf3856ad364e35_10.0.10240.16384_none_40ba2ec3d03bceb0" "f!proactive-telemetry-event_8ac43a41e5030538" REG_DWORD 0
- rem call :AddReg "HKLM\COMPONENTS\DerivedData\Components\amd64_microsoft-windows-c..lemetry.lib.cortana_31bf3856ad364e35_10.0.10240.16384_none_40ba2ec3d03bceb0" "f!proactive-telemetry-inter_58073761d33f144b" REG_DWORD 0
- REM *** Hide the search box from taskbar. You can still search by pressing the Win key and start typing what you're looking for ***
- REM 0 = hide completely, 1 = show only icon, 2 = show long search box
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" "SearchboxTaskbarMode" REG_DWORD 0
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Search" "BingSearchEnabled" REG_DWORD 0
- REM *** Disable MRU lists (jump lists) of XAML apps in Start Menu ***
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Start_TrackDocs" REG_DWORD 0
- REM *** Set Windows Explorer to start on This PC instead of Quick Access ***
- REM 1 = This PC, 2 = Quick access
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "LaunchTo" REG_DWORD 1
- REM *** Show Computer shortcut on desktop ***
- REM 0 = show icon, 1 = don't show icon
- call :AddReg "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" REG_DWORD 0
- REM *** Show Network shortcut on desktop ***
- REM 0 = show icon, 1 = don't show icon
- call :AddReg "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" "{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}" REG_DWORD 0
- REM *** Change Clock and Date formats 24H, metric (Sign out required to see changes) ***
- call :AddReg "HKCU\Control Panel\International" "iMeasure" REG_SZ "0"
- call :AddReg "HKCU\Control Panel\International" "iNegCurr" REG_SZ "1"
- call :AddReg "HKCU\Control Panel\International" "iTime" REG_SZ "1"
- call :AddReg "HKCU\Control Panel\International" "sShortDate" REG_SZ "yyyy/MM/dd"
- call :AddReg "HKCU\Control Panel\International" "sShortTime" REG_SZ "HH:mm"
- call :AddReg "HKCU\Control Panel\International" "sTimeFormat" REG_SZ "H:mm:ss"
- REM *** Set Notepad to Arial font, Size 11, Hebrew script charset, WordWrap On ****
- call :AddReg "HKCU\SOFTWARE\Microsoft\Notepad" "lfFaceName" REG_SZ "Arial"
- call :AddReg "HKCU\SOFTWARE\Microsoft\Notepad" "iPointSize" REG_DWORD 110
- call :AddReg "HKCU\SOFTWARE\Microsoft\Notepad" "lfCharSet" REG_DWORD 177
- call :AddReg "HKCU\SOFTWARE\Microsoft\Notepad" "fWrap" REG_DWORD 1
- REM *** Add "Take Ownership" on right-click menu of files & folders (with shield icon) ***
- call :AddReg "HKCR\*\shell\runas" "HasLUAShield" REG_SZ ""
- call :AddReg "HKCR\*\shell\runas" "NoWorkingDirectory" REG_SZ ""
- call :AddReg "HKCR\*\shell\runas" REG_SZ "Take ownership"
- call :AddReg "HKCR\*\shell\runas\command" REG_SZ "cmd.exe /c takeown \""%%%%1\"" /a && icacls \""%%%%1\"" /grant %AdminsGroup%:F"
- call :AddReg "HKCR\*\shell\runas\command" "IsolatedCommand" REG_SZ "cmd.exe /c takeown \""%%%%1\"" /a && icacls \""%%%%1\"" /grant %AdminsGroup%:F"
- call :AddReg "HKCR\Directory\shell\runas" "HasLUAShield" REG_SZ ""
- call :AddReg "HKCR\Directory\shell\runas" "NoWorkingDirectory" REG_SZ ""
- call :AddReg "HKCR\Directory\shell\runas" REG_SZ "Take ownership"
- call :AddReg "HKCR\Directory\shell\runas\command"
- call :AddReg "HKCR\Directory\shell\runas\command" REG_SZ "cmd.exe /c takeown \""%%%%1\"" /a /r y && icacls \""%%%%1\"" /grant %AdminsGroup%:F"
- call :AddReg "HKCR\Directory\shell\runas\command" "IsolatedCommand" REG_SZ "cmd.exe /c takeown \""%%%%1\"" /a /r y && icacls \""%%%%1\"" /grant %AdminsGroup%:F"
- REM *** Enable Developer Mode (enables you to run XAML apps you develop in Visual Studio which haven't been certified yet) ***
- REM Computer Configuration > Administrative Templates > Windows Components > App Package Deployment
- REM Enabling these settings in GPEDIT will grey-out those options in SETTINGS > Update & Security > For Developers
- REM source: https://msdn.microsoft.com/library/windows/apps/xaml/dn706236.aspx
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" "AllowAllTrustedApps" REG_DWORD 1
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" "AllowDevelopmentWithoutDevLicense " REG_DWORD 1
- REM *** Change Mouse cursors to Extra Large Black ***
- call :AddReg "HKCU\Control Panel\Cursors" REG_SZ "Windows Black [extra large]"
- call :AddReg "HKCU\Control Panel\Cursors" "Hand" REG_EXPAND_SZ %%SystemRoot%%\cursors\aero_link_xl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "Arrow" REG_EXPAND_SZ %%SystemRoot%%\cursors\arrow_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "IBeam" REG_EXPAND_SZ %%SystemRoot%%\cursors\beam_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "Wait" REG_EXPAND_SZ %%SystemRoot%%\cursors\busy_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "Crosshair" REG_EXPAND_SZ %%SystemRoot%%\cursors\cross_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "Help" REG_EXPAND_SZ %%SystemRoot%%\cursors\help_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "SizeAll" REG_EXPAND_SZ %%SystemRoot%%\cursors\move_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "No" REG_EXPAND_SZ %%SystemRoot%%\cursors\no_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "NWPen" REG_EXPAND_SZ %%SystemRoot%%\cursors\pen_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "SizeNESW" REG_EXPAND_SZ %%SystemRoot%%\cursors\size1_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "SizeNWSE" REG_EXPAND_SZ %%SystemRoot%%\cursors\size2_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "SizeWE" REG_EXPAND_SZ %%SystemRoot%%\cursors\size3_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "SizeNS" REG_EXPAND_SZ %%SystemRoot%%\cursors\size4_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "UpArrow" REG_EXPAND_SZ %%SystemRoot%%\cursors\up_rl.cur
- call :AddReg "HKCU\Control Panel\Cursors" "AppStarting" REG_EXPAND_SZ %%SystemRoot%%\cursors\wait_rl.cur
- REM *** Lock the Taskbar ***
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "TaskbarSizeMove" REG_DWORD 0
- REM *** Delay Taskbar thumbnail pop-ups to 10 seconds ***
- call :AddReg "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "ExtendedUIHoverTime" REG_DWORD "10000"
- REM *** Enable verbose status messages when you sign in/out of Windows ***
- REM In Win7, Better to do it via GPEDIT.MSC, as it also updates the POL file (GPEDIT option is missing in Win10).
- REM GPEDIT.MSC > Computer Configuration > Administrative Templates > System: Verbose vs normal status messages. Set to "Enabled".
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" "VerboseStatus" REG_DWORD 1
- REM *** Turn OFF Sticky Keys when SHIFT is pressed 5 times ***
- REM 506 = Off, 510 = On (default)
- call :AddReg "HKCU\Control Panel\Accessibility\StickyKeys" "Flags" REG_SZ "506"
- REM *** Turn OFF Filter Keys when SHIFT is pressed for 8 seconds ***
- REM 122 = Off, 126 = On (default)
- call :AddReg "HKCU\Control Panel\Accessibility\Keyboard Response" "Flags" REG_SZ "122"
- REM *** Underline keyboard shortcuts and access keys ***
- call :AddReg "HKCU\Control Panel\Accessibility\Keyboard Preference" "On" REG_SZ 1
- REM *** Use Windows Photo Viewer to open photo files (Enterprise LTSB default is MSPAINT) ***
- call :AddReg "HKCU\Software\Classes\.jpg" REG_SZ "PhotoViewer.FileAssoc.Tiff"
- call :AddReg "HKCU\Software\Classes\.jpeg" REG_SZ "PhotoViewer.FileAssoc.Tiff"
- call :AddReg "HKCU\Software\Classes\.gif" REG_SZ "PhotoViewer.FileAssoc.Tiff"
- call :AddReg "HKCU\Software\Classes\.png" REG_SZ "PhotoViewer.FileAssoc.Tiff"
- call :AddReg "HKCU\Software\Classes\.bmp" REG_SZ "PhotoViewer.FileAssoc.Tiff"
- call :AddReg "HKCU\Software\Classes\.tiff" REG_SZ "PhotoViewer.FileAssoc.Tiff"
- call :AddReg "HKCU\Software\Classes\.ico" REG_SZ "PhotoViewer.FileAssoc.Tiff"
- call :AddReg "HKCR\Applications\photoviewer.dll\shell\open" "MuiVerb" REG_SZ "@photoviewer.dll,-3043"
- call :AddReg "HKCR\Applications\photoviewer.dll\shell\open\DropTarget" "Clsid" REG_SZ "{FFE2A43C-56B9-4bf5-9A79-CC6D4285608A}"
- call :AddReg "HKCR\Applications\photoviewer.dll\shell\print\DropTarget" "Clsid" REG_SZ "{60fd46de-f830-4894-a628-6fa81bc0190d}"
- call :AddReg "HKCR\Applications\photoviewer.dll\shell\open\command" REG_EXPAND_SZ "%%%%SystemRoot%%%%\System32\rundll32.exe ""%%%%ProgramFiles%%%%\Windows Photo Viewer\PhotoViewer.dll"", ImageView_Fullscreen %%%%1"
- call :AddReg "HKCR\Applications\photoviewer.dll\shell\print\command" REG_EXPAND_SZ "%%%%SystemRoot%%%%\System32\rundll32.exe ""%%%%ProgramFiles%%%%\Windows Photo Viewer\PhotoViewer.dll"", ImageView_Fullscreen %%%%1"
- REM *** Win10 - Enable dark theme on XAML (Modern UI) apps [sign out required] ***
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" "AppsUseLightTheme" REG_DWORD 0
- call :AddReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Personalize" "AppsUseLightTheme" REG_DWORD 0
- REM *** Remove Libraries - RISKY!! ***
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\{031E4825-7B94-4dc3-B131-E946B44C8DD5}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{59BD6DD1-5CEC-4d7e-9AD2-ECC64154418D}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{C4D98F09-6124-4fe0-9942-826416082DA9}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\UsersLibraries"
- call :DelRegClsIDForced "{031E4825-7B94-4dc3-B131-E946B44C8DD5}"
- call :DelRegClsIDForced "{1CF324EC-F905-4c69-851A-DDC8795F71F2}"
- call :DelRegClsIDForced "{51F649D3-4BFF-42f6-A253-6D878BE1651D}"
- call :DelRegClsIDForced "{896664F7-12E1-490f-8782-C0835AFD98FC}"
- call :DelRegClsIDForced "{c51b83e5-9edd-4250-b45a-da672ee3c70e}"
- call :DelRegClsIDForced "{e9711a2f-350f-4ec1-8ebd-21245a8b9376}"
- call :DelRegForced "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.NavPaneShowLibraries"
- call :DelRegForced "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\Namespace\Windows\UserLibraries"
- call :DelRegForced "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\SettingSync\WindowsSettingHandlers\UserLibraries"
- call :DelRegForced "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Windows.NavPaneShowLibraries"
- call :DelRegForced "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SettingSync\Namespace\Windows\UserLibraries"
- call :DelRegForced "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SettingSync\WindowsSettingHandlers\UserLibraries"
- call :DelReg "HKCU\SOFTWARE\Classes\Local Settings\MuiCache\1\52C64B7E" "@C:\Windows\system32\windows.storage.dll,-50691"
- REM *** Remove "Show Libraries" from Folder Options -> View tab (Advanced Settings) ***
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced\NavPane\ShowLibraries"
- REM *** Remove Music, Pictures & Videos from Start Menu places (Settings > Personalization > Start > Choose which folders appear on Start) ***
- del "%ProgramData%\Microsoft\Windows\Start Menu Places\05 - Music.lnk"
- del "%ProgramData%\Microsoft\Windows\Start Menu Places\06 - Pictures.lnk"
- del "%ProgramData%\Microsoft\Windows\Start Menu Places\07 - Videos.lnk"
- REM *** Remove Music, Pictures & Videos from Libraries ***
- del "%APPDATA%\Microsoft\Windows\Libraries\Music.library-ms"
- del "%APPDATA%\Microsoft\Windows\Libraries\Pictures.library-ms"
- del "%APPDATA%\Microsoft\Windows\Libraries\Videos.library-ms"
- REM *** Remove Music (appears under This PC in File Explorer) ***
- call :DelReg "HKCR\SystemFileAssociations\MyMusic"
- call :DelReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "My Music"
- call :DelReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Music"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{3f2a72a7-99fa-4ddb-a5a8-c604edf61d6b}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "CommonMusic"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "CommonMusic"
- call :DelReg "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "My Music"
- call :DelReg "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Music"
- call :DelReg "HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Music"
- call :DelReg "HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Music"
- call :DelRegClsIDForced "{1CF1260C-4DD0-4ebb-811F-33C572699FDE}"
- call :DelRegClsIDForced "{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de}"
- REM *** Remove Pictures (appears under This PC in File Explorer) ***
- call :DelReg "HKCR\SystemFileAssociations\MyPictures"
- call :DelReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "My Pictures"
- call :DelReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Pictures"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{0b2baaeb-0042-4dca-aa4d-3ee8648d03e5}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{4dcafe13-e6a7-4c28-be02-ca8c2126280d}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{c1f8339f-f312-4c97-b1c6-ecdf5910c5c0}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "CommonPictures"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\StartMenu\StartPanel\PinnedItems\Pictures"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "CommonPictures"
- call :DelReg "HKU\.DEFAULT\Software\Classes\Local Settings\MuiCache\1\52C64B7E" "@C:\Windows\System32\Windows.UI.Immersive.dll,-38304"
- call :DelReg "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "My Pictures"
- call :DelReg "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Pictures"
- call :DelReg "HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Pictures"
- call :DelReg "HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Pictures"
- call :DelRegClsIDForced "{24ad3ad4-a569-4530-98e1-ab02f9417aa8}"
- call :DelRegClsIDForced "{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA}"
- call :DelRegForced "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{b3690e58-e961-423b-b687-386ebfd83239}"
- call :DelRegForced "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{b3690e58-e961-423b-b687-386ebfd83239}"
- REM *** Remove Videos (appears under This PC in File Explorer) ***
- call :DelReg "HKCR\SystemFileAssociations\MyVideo"
- call :DelReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "My Video"
- call :DelReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Video"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{292108be-88ab-4f33-9a26-7748e62e37ad}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{51294DA1-D7B1-485b-9E9A-17CFFE33E187}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{5fa96407-7e77-483c-ac93-691d05850de8}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes\{ea25fbd7-3bf7-409e-b97f-3352240903f4}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "CommonVideo"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "CommonVideo"
- call :DelReg "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "My Video"
- call :DelReg "HKU\.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Video"
- call :DelReg "HKU\S-1-5-19\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Video"
- call :DelReg "HKU\S-1-5-20\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My Video"
- call :DelRegClsIDForced "{A0953C92-50DC-43bf-BE83-3742FED03C9C}"
- call :DelRegClsIDForced "{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a}"
- REM *** Add 8 more accent colors ***
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Accents\0\Theme0" "Color" REG_DWORD "9538419"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Accents\0\Theme1" "Color" REG_DWORD "10915422"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Accents\1\Theme0" "Color" REG_DWORD "10766359"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Accents\1\Theme1" "Color" REG_DWORD "10766359"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Accents\2\Theme0" "Color" REG_DWORD "6392360"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Accents\2\Theme1" "Color" REG_DWORD "12235947"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Accents\3\Theme0" "Color" REG_DWORD "8764727"
- call :DelReg "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Themes\Accents\3\Theme1" "Color" REG_DWORD "8764727"
- REM *** Remove music/OneDrive/Pictures/Videos from DiskSnapshot ***
- call :DelReg "HKLM\SOFTWARE\Microsoft\DiskSnapshot\v2\0\.?users?*?music*"
- call :DelReg "HKLM\SOFTWARE\Microsoft\DiskSnapshot\v2\0\.?users?*?onedrive*"
- call :DelReg "HKLM\SOFTWARE\Microsoft\DiskSnapshot\v2\0\.?users?*?pictures*"
- call :DelReg "HKLM\SOFTWARE\Microsoft\DiskSnapshot\v2\0\.?users?*?videos*"
- REM *** Remove Pictures, Music, Videos from MUIcache ***
- call :DelReg "HKCU\SOFTWARE\Classes\Local Settings\MuiCache\1\52C64B7E" "@windows.storage.dll,-21790"
- call :DelReg "HKCU\SOFTWARE\Classes\Local Settings\MuiCache\1\52C64B7E" "@windows.storage.dll,-34584"
- call :DelReg "HKCU\SOFTWARE\Classes\Local Settings\MuiCache\1\52C64B7E" "@windows.storage.dll,-34595"
- call :DelReg "HKCU\SOFTWARE\Classes\Local Settings\MuiCache\1\52C64B7E" "@windows.storage.dll,-34620"
- call :DelReg "HKU\.DEFAULT\Software\Classes\Local Settings\MuiCache\1\52C64B7E" "@windows.storage.dll,-21790"
- REM *** Remove OneDrive ***
- call :DelRegClsID "{018D5C66-4533-4307-9B53-224DE2ED1FE6}"
- call :DelReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\OneDrive" "DisableFileSyncNGSC" REG_DWORD 1
- REM *** Remove Retail Demo ***
- call :DelDirForced "%ProgramData%\Microsoft\Windows\RetailDemo"
- call :DelDirForced "%SystemRoot%\SystemApps\Microsoft.Windows.CloudExperienceHost_cw5n1h2txyewy\RetailDemo"
- REM *** Remove Logon screen wallpaper/background. Will use solid color instead (Accent color) ***
- call :AddReg "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" "DisableLogonBackgroundImage" REG_DWORD 1
- REM *** Always show all icons on the taskbar (next to clock) ***
- REM 0 = Show all icons
- REM 1 = Hide icons on the taskbar
- call :AddReg "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer" "EnableAutoTray" REG_DWORD 0
- REM *** Show hidden files in Explorer ***
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "Hidden" REG_DWORD 1
- REM *** Show super hidden system files in Explorer ***
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "ShowSuperHidden" REG_DWORD 1
- REM *** Show file extensions in Explorer ***
- REM 0 = extensions are visible
- REM 1 = extensions are hidden
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "HideFileExt" REG_DWORD 0
- rem *** Show super-duper hidden extensions [basically deleting the NeverShowExt (REG_SZ) values] ***
- REM Source: www.askvg.com/tip-how-to-show-file-extensions-of-shortcuts-lnk-url-pif-in-windows-explorer/
- REM .LNK (File/Folder Shortcut)
- REM .URL (Internet Shortcut)
- REM .PIF (MS-DOS Program Shortcut)
- REM .SCF (Windows Explorer Command)
- REM .SHS (Shell Scrap Object)
- REM .SHB (Document Shortcut)
- REM .library-ms (Library folder)
- call :DelReg "HKCR\lnkfile" "NeverShowExt"
- call :DelReg "HKCR\IE.AssocFile.URL" "NeverShowExt"
- call :DelReg "HKCR\IE.AssocFile.WEBSITE" "NeverShowExt"
- call :DelReg "HKCR\InternetShortcut" "NeverShowExt"
- call :DelReg "HKCR\Microsoft.Website" "NeverShowExt"
- call :DelReg "HKCR\piffile" "NeverShowExt"
- call :DelReg "HKCR\SHCmdFile" "NeverShowExt"
- call :DelReg "HKCR\LibraryFolder" "NeverShowExt"
- REM *** An oldy, but a goody. Adding the following value to the registry will prevent both Windows and Office from creating LNK files in the Recents folder on your C drive. Especially recommended if your OS is installed on an SSD.***
- REM *** Need to check if this also works with Office 2007/2010/2013 running on Win10
- call :AddReg "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" "NoRecentDocsHistory" REG_DWORD 1
- REM *** Show NTFS files compressed in a different color in Explorer ***
- REM 0 = Black (same as non-compressed files)
- REM 1 = Blue [default]
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "ShowCompColor" REG_DWORD 1
- REM *** Expand to current folder in the left panel in Explorer ***
- REM 0 = Don't expand
- REM 1 = Expand
- call :AddReg "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" "NavPaneExpandToCurrentFolder" REG_DWORD 1
- REM *** Disable WiFi Sense (shares your WiFi network login with other people) ***
- call :AddReg "HKLM\SOFTWARE\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" "value" REG_DWORD 0
- call :AddReg "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" "value" REG_DWORD 0
- REM *** Disable Superfetch (A must for SSD drives, but good to do in general) ***
- REM Disabling this service prevents further creation of PF files in C:\Windows\Prefetch.
- REM After disabling this service, it is completely safe to delete everything in that folder, except for the ReadyBoot folder.
- sc config SysMain start= disabled
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" "EnableSuperfetch" REG_DWORD 0
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" "EnablePrefetcher" REG_DWORD 0
- REM *** Add the option "Processor performance core parking min cores" ***
- REM *** Option will be added to: Power Options > High Performance > Change Plan Settings > Change advanced power settings > Processor power management
- REM *** Default data is 1 (option hidden).
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\0cc5b647-c1df-4637-891a-dec35c318583" "Attributes" REG_DWORD 0
- REM *** Disable CPU Core Parking ***
- REM *** Default value is 100 decimal.
- REM Basically "Core parking" means that the OS can use less CPU cores when they're not needed, thus saving power.
- REM This, however, can somewhat hamper performance, so advanced users prefer to disable this feature.
- REM Better to do this on a desktop. If youβre using a laptop and battery life is important to you - don't change this.
- REM source: https://bitsum.com/parkcontrol/
- call :AddReg "HKLM\SYSTEM\CurrentControlSet\Control\Power\PowerSettings\54533251-82be-4824-96c1-47b60b740d00\0cc5b647-c1df-4637-891a-dec35c318583" "ValueMax" REG_DWORD 0
- REM *** SERVICES tweaks ***
- for %%i in (
- DiagTrack
- diagnosticshub.standardcollector.service
- dmwappushservice
- RemoteRegistry
- TrkWks
- WMPNetworkSvc
- WSearch
- ) do (
- sc config %%i start= disabled
- sc stop %%i
- )
- REM *** SCHEDULED TASKS tweaks ***
- REM "Microsoft\Windows\CloudExperienceHost\CreateObjectTask"
- REM "Microsoft\Windows\DiskFootprint\Diagnostics" *** Not sure if should be disabled, maybe related to S.M.A.R.T.
- REM The task Microsoft\Windows\SettingSync\BackgroundUploadTask can be disabled using a simple bit change. I use a REG file for that. Reg key is different for each machine/edition!
- for %%i in (
- "Microsoft\Windows\AppID\SmartScreenSpecific"
- "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser"
- "Microsoft\Windows\Application Experience\ProgramDataUpdater"
- "Microsoft\Windows\Application Experience\StartupAppTask"
- "Microsoft\Windows\Autochk\Proxy"
- "Microsoft\Windows\Customer Experience Improvement Program\Consolidator"
- "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask"
- "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip"
- "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector"
- "Microsoft\Windows\FileHistory\File History (maintenance mode)"
- "Microsoft\Windows\Maintenance\WinSAT"
- "Microsoft\Windows\NetTrace\GatherNetworkInfo"
- "Microsoft\Windows\PI\Sqm-Tasks"
- "Microsoft\Windows\Time Synchronization\ForceSynchronizeTime"
- "Microsoft\Windows\Time Synchronization\SynchronizeTime"
- "Microsoft\Windows\Windows Error Reporting\QueueReporting"
- "Microsoft\Windows\WindowsUpdate\Automatic App Update"
- ) do SchTasks /Change /TN %%i /DISABLE
- for %%j in (
- "DiagTrack"
- "Microsoft-OneCore-AllowTelemetry"
- "Microsoft-OneCore-AppRuntime-WOW64-xbox"
- "Microsoft-OneCore-AppRuntime-xbox"
- "Microsoft-OneCore-Networking-XboxLive"
- "Microsoft-OneCore-TroubleShooting"
- "Microsoft-Windows-Client-Drivers-xbox"
- "Microsoft-Windows-Client-Features-Package-AutoMerged-xbox"
- "Microsoft-Windows-Client-Features-WOW64-Package-AutoMerged-xbox"
- "Microsoft-Windows-Cortana"
- "Microsoft-Windows-InternetExplorer-Optional-Package"
- "Microsoft-Windows-OneDrive"
- "Microsoft-Windows-Search2"
- "Microsoft-Xbox"
- "Telemetry"
- "Windows-Defender"
- ) do for /f "tokens=4,*" %%i in ('DISM /Online /Get-Packages ^| find %%j') do DISM /Online /Remove-Package /PackageName:%%i /NoRestart
- REM *** Remove XAML (Modern) apps using DISM ***
- for %%i in (
- Microsoft.3DBuilder
- Microsoft.BingFinance
- Microsoft.BingNews
- Microsoft.Getstarted
- Microsoft.MicrosoftOfficeHub
- Microsoft.MicrosoftSolitaireCollection
- Microsoft.Office.OneNote
- Microsoft.SkypeApp
- Microsoft.WindowsPhone
- Microsoft.XboxApp
- Microsoft.ZuneMusic
- Microsoft.ZuneVideo
- ) do powershell (Get-AppxProvisionedPackage -Online ^| Where-Object DisplayName -eq %%i ^| Remove-AppxProvisionedPackage -Online)
- REM Now would be a good time to reboot, so all those tweaks take effect.
- REM Using IE11, go to this URL: https://choice.microsoft.com/en-us/opt-out#
- REM Set "Personalized ads in this browser" to Off.
- REM This online setting doesn't seem to work with Edge (Edge is pre-disabled in Enterprise LTSB).
- REM The developer mode may be greyed-out, since we set it through GPEDIT
- REM Go to: Control Panel ->Update & Security -> For Developers -> Select "Developer Mode".
- REM Go to: Control Panel ->Privacy. Go through each setting on the left and turn off everything you don't need (too many to list here).
- REM Run Windows Update and install all the latest updates. Reboot if necessary.
- REM *** Reduce the size of your patched Windows OS (final step before imaging) ***
- REM All installed updates will be permanent and cannot be uninstalled after running this command
- Dism /online /Cleanup-Image /StartComponentCleanup /ResetBase
- REM *** Ban Skype advertisement ****
- set HOSTS=%WINDIR%\system32\drivers\etc\hosts
- for %%i in (
- "rad.msn.com"
- "apps.skype.com"
- ) do findstr /i %%i %HOSTS% > nul 2> nul || echo %NoIP% %%~i >> %HOSTS%
- exit /b
- :DelDirForced
- if not [%1]==[] if exist %1 (
- takeown /f %1 /r /d y
- icacls %1 /grant %AdminsGroup%:F /T
- rd /s /q %1
- )
- exit /b
- :GetRegAccess
- %SetACL% -on %1 -ot reg -actn setowner -ownr "n:%AdminsGroup%" -rec yes
- %SetACL% -on %1 -ot reg -actn ace -ace "n:%AdminsGroup%;p:full" -rec yes
- exit /b
- :AddReg
- if not [%4]==[] (
- reg add %1 /v %2 /t %~3 /d %4 /f /reg:32
- reg add %1 /v %2 /t %~3 /d %4 /f /reg:64
- ) else if not [%3]==[] (
- reg add %1 /ve /t %~2 /d %3 /f /reg:32
- reg add %1 /ve /t %~2 /d %3 /f /reg:64
- ) else (
- reg add %1 /f /reg:32
- reg add %1 /f /reg:64
- )
- exit /b
- :AddRegForced
- call :GetRegAccess %1
- if not [%4]==[] (
- reg add %1 /v %2 /t %~3 /d %4 /f
- ) else if not [%3]==[] (
- reg add %1 /ve /t %~2 /d %3 /f
- ) else (
- reg add %1 /f
- )
- exit /b
- :DelReg
- if not [%2]==[] (
- reg delete %1 /v %2 /f /reg:32
- reg delete %1 /v %2 /f /reg:64
- ) else (
- reg delete %1 /f /reg:32
- reg delete %1 /f /reg:64
- )
- exit /b
- :DelRegForced
- call :GetRegAccess %1
- if not [%2]==[] (
- reg delete %1 /v %2 /f
- ) else (
- reg delete %1 /f
- )
- exit /b
- :DelRegClsID
- if not [%1]==[] (
- reg delete "HKCU\SOFTWARE\Classes\CLSID\%~1" /f /reg:32
- reg delete "HKCU\SOFTWARE\Classes\CLSID\%~1" /f /reg:64
- reg delete "HKLM\SOFTWARE\Classes\CLSID\%~1" /f /reg:32
- reg delete "HKLM\SOFTWARE\Classes\CLSID\%~1" /f /reg:64
- )
- exit /b
- :DelRegClsIDForced
- if not [%1]==[] (
- call :GetRegAccess "HKCU\SOFTWARE\Classes\CLSID\%~1"
- call :GetRegAccess "HKLM\SOFTWARE\Classes\CLSID\%~1"
- call :GetRegAccess "HKCU\SOFTWARE\Wow6432Node\Classes\CLSID\%~1"
- call :GetRegAccess "HKLM\SOFTWARE\Wow6432Node\Classes\CLSID\%~1"
- reg delete "HKCU\SOFTWARE\Classes\CLSID\%~1" /f
- reg delete "HKLM\SOFTWARE\Classes\CLSID\%~1" /f
- reg delete "HKCU\SOFTWARE\Wow6432Node\Classes\CLSID\%~1" /f
- reg delete "HKLM\SOFTWARE\Wow6432Node\Classes\CLSID\%~1" /f
- )
- exit /b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement