@ECHO OFF

REM -- Sets global variables
COLOR 1F
SET V=6.5.5
TITLE Windows 10 TNBT: The Next Big Tweak v%V%

REM -- Checks boot state and skips elevation in safemode
COLOR 1F
wmic COMPUTERSYSTEM GET BootupState | findstr /i "fail-safe" > NUL
IF %ERRORLEVEL% EQU 0 GOTO menu_start

REM -- Elevates script if necessary
"%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" > NUL 2>&1
IF '%ERRORLEVEL%' NEQ '0' (GOTO admin_no) ELSE (GOTO admin_yes)
:admin_no
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%TEMP%\runasadmin.vbs"
ECHO UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%TEMP%\runasadmin.vbs"
"%TEMP%\runasadmin.vbs"
EXIT /B
:admin_yes
IF EXIST "%TEMP%\runasadmin.vbs" ( DEL "%TEMP%\runasadmin.vbs" )
PUSHD "%CD%"
CD /D "%~dp0"

REM -- Checks your Windows version
ver | findstr /i "10.0.10586" > NUL
IF %ERRORLEVEL% EQU 0 SET B=VERSION 1511 (BUILD 10586)&GOTO menu_start
ver | findstr /i "10.0.14393" > NUL
IF %ERRORLEVEL% EQU 0 SET B=VERSION 1607 (BUILD 14393)&GOTO menu_start
SET B=YOUR VERSION IS UNTESTED! 
GOTO win_untested

REM -- Warns user that the script was not tested with his Windows version
:win_untested
COLOR 4F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  WARNING                                            บ
ECHO บ  The Windows version you are using was not tested   บ
ECHO บ  with this revision of TNBT. You might encounter    บ
ECHO บ  errors or system malfunctions when using certain   บ
ECHO บ  tweaks and features.                               บ
ECHO บ                                                     บ
ECHO บ  Use TNBT anyway?                                   บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  [1] I'll take the risk        [2] Exit script      บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
SET /p menu0="Select: "
IF '%menu0%' == '1' GOTO menu_start
IF '%menu0%' == '2' EXIT

REM -- Main Menu
:menu_start
COLOR 1F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  MAIN MENU                                          บ
ECHO บ    [1] Windows Tweaks                               บ
ECHO บ    [2] Windows Features                             บ
ECHO บ    [3] Windows Network                              บ
ECHO บ    [4] Diagnostic / Repair Tools                    บ
ECHO บ    [5] Windows Activation Tools                     บ
ECHO บ    [6] Anti-Ransomware Process Faker                บ
ECHO บ                                                     บ
ECHO บ    [7] Check Windows Version                        บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Exit                                         บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu1="Select: "
IF '%menu1%' == '1' GOTO menu_tweaks
IF '%menu1%' == '2' GOTO menu_features
IF '%menu1%' == '3' GOTO menu_network
IF '%menu1%' == '4' GOTO menu_diagnostic
IF '%menu1%' == '5' GOTO menu_activation
IF '%menu1%' == '6' GOTO menu_fakeprocess
IF '%menu1%' == '7' WINVER & GOTO menu_start
IF '%menu1%' == '0' EXIT
GOTO menu_start

REM -- Tweaks Menu
:menu_tweaks
COLOR 1F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  WINDOWS TWEAKS                                     บ
ECHO บ    [1] Apply Registry Tweaks                        บ
ECHO บ    [2] Apply Services Tweaks                        บ
ECHO บ    [3] Apply Thirdparty Services Tweaks             บ
ECHO บ    [4] Apply Scheduled Tasks Tweaks                 บ
ECHO บ                                                     บ
ECHO บ    [5] Recover Registry                             บ
ECHO บ    [6] Recover Services                             บ
ECHO บ    [7] Recover Thirdparty Services                  บ
ECHO บ    [8] Recover Scheduled Tasks                      บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Back to Main Menu                            บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu2="Select: "
IF '%menu2%' == '1' GOTO seq_tweakregistry
IF '%menu2%' == '2' GOTO seq_tweakservices
IF '%menu2%' == '3' GOTO seq_tweaktpservices
IF '%menu2%' == '4' GOTO seq_tweakscheduled
IF '%menu2%' == '5' GOTO seq_recoverregistry
IF '%menu2%' == '6' GOTO seq_recoverservices
IF '%menu2%' == '7' GOTO seq_recovertpservices
IF '%menu2%' == '8' GOTO seq_recoverscheduled
IF '%menu2%' == '0' GOTO menu_start
GOTO menu_start

REM -- Registry Tweaks start
:seq_tweakregistry
COLOR 2F
ECHO.

REM -- Disables Aero Shake
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v NoWindowMinimizingShortcuts /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Explorer" /v NoWindowMinimizingShortcuts /t REG_DWORD /d 1 /f

REM -- Enables Transparency, sets accent color, activates window/taskbar colorization
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v EnableTransparency /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v ColorPrevalence /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v ColorPrevalence /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v AccentColor /t REG_DWORD /d 0x00d77800 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v Composition /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v ColorizationColor /t REG_DWORD /d 0xc40078d7 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v ColorizationAfterglow /t REG_DWORD /d 0xc40078d7 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v ColorizationGlassAttribute /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v EnableWindowColorization /t REG_DWORD /d 1 /f

REM -- Enables an additional security feature for Windows Defender
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\MpEngine" /v MpEnablePus /t REG_DWORD /d 1 /f

REM -- Disables Driver Signing
reg add "HKLM\Software\Microsoft\Driver Signing" /v "Policy" /t REG_BINARY /d "01" /f

REM -- Sets Logon Background to accent color
reg add "HKLM\Software\Policies\Microsoft\Windows\System" /v "DisableLogonBackgroundImage" /t REG_DWORD /d 1 /f

REM -- Removes Pin to start from context menus
reg delete "HKEY_CLASSES_ROOT\exefile\shellex\ContextMenuHandlers\PintoStartScreen" /f > NUL 2>&1
reg delete "HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\PintoStartScreen" /f > NUL 2>&1
reg delete "HKEY_CLASSES_ROOT\mscfile\shellex\ContextMenuHandlers\PintoStartScreen" /f > NUL 2>&1

REM -- Disables various Telemetry and data collection/synchronization settings (ShutUp10 equivalent)
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Device Metadata" /v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "DontShowUI" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "DontShowUI" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Program-Telemetry" /v "Enabled" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v DisableInventory /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AdvertisingInfo" /v "DisabledByGroupPolicy" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v "DisableUAR" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocation" /t "REG_DWORD" /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocationScripting" /t "REG_DWORD" /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableWindowsLocationProvider" /t "REG_DWORD" /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Biometrics" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\MRT" /v DontReportInfectionInformation /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v DisableInventory /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\DeliveryOptimization" /v DODownloadMode /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\HandwritingErrorReports" /v PreventHandwritingErrorReports /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\LocationAndSensors" /v DisableSensors /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Personalization" /v NoLockScreenCamera /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\TabletPC" /v PreventHandwritingDataSharing /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v AllowSearchToUseLocation /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v DisableWebSearch /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v ConnectedSearchUseWeb /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v SpynetReporting /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v SubmitSamplesConsent /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\WMDRM" /v DisableOnline /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg add "HKLM\System\ControlSet001\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v Start /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Personalization\Settings" /v AcceptedPrivacyPolicy /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\InputPersonalization" /v RestrictImplicitInkCollection /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\InputPersonalization" /v RestrictImplicitTextCollection /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\InputPersonalization\TrainedDataStore" /v HarvestContacts /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{E5323777-F976-4f5b-9B55-B94699C46E44}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{2EEF81BE-33FA-4800-9670-1CD474972C3F}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{992AFA70-6F47-4148-B3E9-3003349C1548}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Control Panel\International\User Profile" /v HttpAcceptLanguageOptOut /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization" /v SystemSettingsDownloadMode /t REG_DWORD /d 0 /f
reg add "HKLM\System\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v Start /t REG_DWORD /d 0 /f
reg add "HKLM\System\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger" /v Start /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Siuf\Rules" /v "NumberOfSIUFInPeriod" /t REG_DWORD /d 0 /f
reg delete "HKCU\Software\Microsoft\Siuf\Rules" /v PeriodInNanoSeconds /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Siuf\Rules" /v PeriodInNanoSeconds /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{E5323777-F976-4f5b-9B55-B94699C46E44}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{2EEF81BE-33FA-4800-9670-1CD474972C3F}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{D89823BA-7180-4B81-B50C-7E471E6121A3}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{992AFA70-6F47-4148-B3E9-3003349C1548}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /v Value /t REG_SZ /d Deny /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync" /v SyncPolicy /t REG_DWORD /d 5 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Accessibility" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\AppSync" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\BrowserSettings" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Credentials" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\DesktopTheme" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Personalization" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\StartLayout" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Windows" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\System\CurrentControlSet\Services\lfsvc\Service\Configuration" /v Status /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v SensorPermissionState /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v SensorPermissionState /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v Value /t REG_SZ /d Deny /f

REM -- Enables "This PC" icon on deksktop
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t REG_DWORD /d 0 /f

REM -- Enables classic Control Panel view
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ForceClassicControlPanel" /t REG_DWORD /d 1 /f

reg add "HKCU\Control Panel\Accessibility\StickyKeys" /v "Flags" /t REG_SZ /d "506" /f
reg add "HKCU\Control Panel\Accessibility\Keyboard Response" /v "Flags" /t REG_SZ /d "122" /f

REM -- Disables bing web search
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "AllowCortana" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWeb" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWebOverMeteredConnections" /t REG_DWORD /d 0 /f

REM -- Disables automatic driver downloads from Windows Update
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\DriverSearching" /v "SearchOrderConfig" /t REG_DWORD /d 2 /f

REM -- Shows file extensions
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 0 /f

REM -- Sets default view for explorer to "This PC"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /t REG_DWORD /d 1 /f

REM -- Hides Task View Button
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowTaskViewButton" /t REG_DWORD /d 0 /f

REM -- Disable Tips, Notifications and Notification Center
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\SoftLanding" /v "Enabled" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_TOASTS_ENABLED" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_CRITICAL_TOASTS_ABOVE_LOCK" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_TOASTS_ABOVE_LOCK" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_SUPRESS_TOASTS_WHILE_DUPLICATING" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoToastApplicationNotification" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /t REG_DWORD /d 1 /f

REM -- Disables security warnings
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations" /v "DefaultFileTypeRisk" /t REG_DWORD /d 1808 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v "SaveZoneInformation" /t REG_DWORD /d 1 /f

REM -- Sets timeout for the System to end processes/services after the user tries to shutdown
reg add "HKCU\Control Panel\Desktop" /v "WaitToKillAppTimeout" /t REG_SZ /d "10000" /f
reg add "HKLM\System\CurrentControlSet\Control" /v "WaitToKillServiceTimeout" /t REG_SZ /d "10000" /f

REM -- Improves responsiveness of your system by removing delays
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /v "StartupDelayInMSec" /t REG_DWORD /d 75 /f
reg add "HKCU\Control Panel\Desktop" /v "MenuShowDelay" /t REG_DWORD /d 75 /f
reg add "HKCU\Control Panel\Mouse" /v "MouseHoverTime" /t REG_SZ /d 75 /f

REM -- Disables automatic maintenance
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" /v "MaintenanceDisabled" /t REG_DWORD /d "1" /f

REM -- Disables Encrypting File System
reg add "HKLM\System\CurrentControlSet\Control\FileSystem" /v "NtfsDisableEncryption" /t REG_DWORD /d 1 /f
reg add "HKLM\System\CurrentControlSet\Control\FileSystem" /v "NtfsDisableLastAccessUpdate" /t REG_DWORD /d 1 /f

REM -- Disables Active Desktop
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ForceActiveDesktopOn" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoActiveDesktop" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoActiveDesktopChanges" /t REG_DWORD /d 1 /f

REM -- Disables Smart Screen
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f
reg add "HKLM\Software\Policies\Microsoft\Windows\System" /v "EnableSmartScreen" /t "REG_DWORD" /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t "REG_DWORD" /d 0 /f

REM -- Disables Lockscreen (no longer working on Windows Core/Pro 1607)
reg add "HKLM\Software\Policies\Microsoft\Windows\Personalization" /v "NoLockScreen" /t REG_DWORD /d 1 /f

REM -- Disables Wifi Sense
reg add "HKLM\Software\Microsoft\WcmSvc\wifinetworkmanager\config" /v AutoConnectAllowedOEM /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v "value" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v "value" /t REG_DWORD /d 0 /f

REM -- Disables sending files to encrypted drives
reg add "HKLM\Software\Policies\Microsoft\Windows\EnhancedStorageDevices" /v "TCGSecurityActivationDisabled" /t REG_DWORD /d 0 /f

REM -- Disables OneDrive Sync
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d 1 /f

REM -- Disables settings synchronization
reg add "HKLM\Software\Policies\Microsoft\Windows\SettingSync" /v "DisableSettingSync" /t REG_DWORD /d 2 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\SettingSync" /v "DisableSettingSyncUserOverride" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Steps-Recorder" /v "Enabled" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DownloadMode" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DODownloadMode" /t REG_DWORD /d 0 /f

REM -- Increases wallpaper image quality
reg add "HKCU\Control Panel\Desktop" /v "JPEGImportQuality" /t REG_DWORD /d 100 /f

REM -- Disables automatic update for downloaded maps
reg add "HKLM\Software\Policies\Microsoft\Windows\Maps" /v "AutoDownloadAndUpdateMapData" /t "REG_DWORD" /d 0 /f

REM -- Removes OneDrive from autorun and explorer
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /f > NUL 2>&1
reg add "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 0 /f
reg add "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 0 /f > NUL 2>&1

REM -- Deactivate screensaver
reg add "HKCU\Control Panel\Desktop" /v "ScreenSaveActive" /t REG_SZ /d 0 /f

REM -- Disables GameDVR
reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\GameDVR" /v "AllowgameDVR" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t REG_DWORD /d 0 /f

REM -- Removes frequent/recent entries from explorer
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowFrequent" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecent" /t REG_DWORD /d 0 /f

REM -- Disables CD/DVD/USB autorun
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutorun" /t REG_DWORD /d "0xFF" /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutorun" /t REG_DWORD /d "0xFF" /f

REM -- Sets computers active hours to 10-22h
reg add "HKLM\Software\Microsoft\WindowsUpdate\UX\Settings" /v "ActiveHoursStart" /t REG_DWORD /d "10" /f
reg add "HKLM\Software\Microsoft\WindowsUpdate\UX\Settings" /v "ActiveHoursEnd" /t REG_DWORD /d "22" /f

REM -- Removes "Scan with Windows defender" from context menu (only works if WD is disabled)
reg delete "HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\EPP" /f > NUL 2>&1
reg delete "HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\EPP" /f > NUL 2>&1
reg delete "HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\EPP" /f > NUL 2>&1

REM -- Disables reveal password button
reg add "HKLM\Software\Policies\Microsoft\Windows\CredUI" /v DisablePasswordReveal /t REG_DWORD /d 1 /f

REM -- Internet Explorer / Microsoft Edge optimizations
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Suggested Sites" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer" /v AllowServicePoweredQSA /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete" /v AutoSuggest /t REG_SZ /d no /f
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions" /v NoUpdateCheck /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Geolocation" /v PolicyDisableGeolocation /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Use FormSuggest" /t REG_SZ /d no /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v DoNotTrack /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "FormSuggest Passwords" /t REG_SZ /d no /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\SearchScopes" /v ShowSearchSuggestionsGlobal /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\PhishingFilter" /v EnabledV9 /t REG_DWORD /d 0 /f

REM -- Prevent device metadata retrieval from the Internet
reg add "HKLM\Software\Policies\Microsoft\Windows\Device Metadata" /v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 1 /f

REM -- Disable Windows Updates for Malicious Software Removal Tool
reg add "HKLM\Software\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /t REG_DWORD /d 1 /f

REM -- Disables Aero Peek
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v DisablePreviewDesktop /t REG_DWORD /d 1 /f

REM -- Sets Windows sound scheme to "No Sounds"
reg add "HKCU\AppEvents\Schemes" /t REG_SZ /d ".None" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\.Default\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\AppGPFault\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\CCSelect\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\ChangeTheme\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Close\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\CriticalBatteryAlarm\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\DeviceConnect\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\DeviceDisconnect\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\DeviceFail\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\FaxBeep\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\LowBatteryAlarm\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\MailBeep\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Maximize\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\MenuCommand\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\MenuPopup\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\MessageNudge\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Minimize\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Default\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.IM\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm10\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm2\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm3\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm4\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm5\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm6\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm7\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm8\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Alarm9\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call10\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call2\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call3\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call4\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call5\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call6\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call7\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call8\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Looping.Call9\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Mail\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Proximity\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.Reminder\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Notification.SMS\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\Open\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\PrintComplete\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\ProximityConnection\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\RestoreDown\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\RestoreUp\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\ShowBand\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\SystemAsterisk\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\SystemExclamation\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\SystemExit\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\SystemHand\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\SystemNotification\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\SystemQuestion\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\WindowsLogoff\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\WindowsLogon\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\WindowsUAC\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\.Default\WindowsUnlock\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\sapisvr\DisNumbersSound\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\sapisvr\HubOffSound\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\sapisvr\HubOnSound\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\sapisvr\HubSleepSound\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\sapisvr\MisrecoSound\.Current" /t REG_SZ /d "" /f
reg add "HKCU\AppEvents\Schemes\Apps\sapisvr\PanelSound\.Current" /t REG_SZ /d "" /f

REM -- Restarts explorer.exe to make registry tweaks visible without reboot
taskkill /IM explorer.exe /F & explorer.exe > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_tweaks

REM -- Services Tweaks start
:seq_tweakservices
COLOR 2F
ECHO.

REM -- Disables Windows Telemetry services
sc config diagnosticshub.standardcollector.service start= disabled
net stop diagnosticshub.standardcollector.service > NUL 2>&1
sc config DiagTrack start= disabled
net stop DiagTrack > NUL 2>&1
sc config dmwappushservice start= disabled
net stop dmwappushservice > NUL 2>&1

REM -- Disables OneDrive service
sc config OneSyncSvc start= disabled
net stop OneSyncSvc > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\OneSyncSvc_Session1" /v "Start" /t REG_DWORD /d 4 /f > NUL 2>&1

REM -- Disables RetailDemo service
sc config RetailDemo start=disabled
net stop RetailDemo > NUL 2>&1

REM -- Disables Windows Search service
sc config WSearch start= disabled
net stop WSearch > NUL 2>&1
del "C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb" /s > NUL 2>&1

REM -- Disables Adobe services if installed
sc config AdobeARMservice start= disabled > NUL 2>&1
net stop AdobeARMservice > NUL 2>&1
sc config AGSService start= disabled > NUL 2>&1
net stop AGSService > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_tweaks

REM -- Disabled third party services
:seq_tweaktpservices
COLOR 2F
ECHO.
ECHO Disabling third party services...

REM -- Disables Google Chrome Update services
sc config gupdate start= demand > NUL 2>&1
net stop gupdate > NUL 2>&1

REM -- Disables Adobe services
sc config AdobeARMservice start= demand > NUL 2>&1
net stop AdobeARMservice > NUL 2>&1
sc config AGSService start= demand > NUL 2>&1
net stop AGSService > NUL 2>&1
sc config AdobeFlashPlayerUpdateSvc start= demand > NUL 2>&1
net stop AdobeFlashPlayerUpdateSvc > NUL 2>&1

REM -- Disables NVIDIA Geforce Experience service
sc config GfExperienceService start= demand > NUL 2>&1
net stop GfExperienceService > NUL 2>&1

REM -- Disables AMD service
sc config "AMD External Events Utility" start= demand > NUL 2>&1
net stop "AMD External Events Utility" > NUL 2>&1

REM -- Disables Conexant Audio Message Service
sc config CxAudMsg start= demand > NUL 2>&1
net stop CxAudMsg > NUL 2>&1
sc config SAService start= demand > NUL 2>&1
net stop SAService > NUL 2>&1

REM -- Disables Yandex Browser Update service
sc config YandexBrowserService start= demand > NUL 2>&1
net stop YandexBrowserService > NUL 2>&1

ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_tweaks

REM -- Scheduled Tasks Tweaks start
:seq_tweakscheduled
COLOR 2F
ECHO.
ECHO Disabling Windows scheduled tasks...
schtasks /Change /TN "Microsoft\Windows\SettingSync\BackgroundUploadTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64 Critical" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 Critical" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\AppID\SmartScreenSpecific" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\ApplicationData\CleanupTemporaryState" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\ApplicationData\DsSvcCleanup" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Application Experience\AitAgent" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Autochk\Proxy" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\CloudExperienceHost\CreateObjectTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\BthSQM" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\HypervisorFlightingTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Diagnosis\Scheduled" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\DiskFootprint\Diagnostics" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\DiskFootprint\StorageSense" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\ErrorDetails\EnableErrorDetailsUpdate" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Feedback\Siuf\DmClient" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\File Classification Infrastructure\Property Definition Sync" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Management\Provisioning\Logon" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Maintenance\WinSAT" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Maps\MapsToastTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Maps\MapsUpdateTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Mobile Broadband Accounts\MNO Metadata Parser" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Multimedia\SystemSoundsService" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\NlaSvc\WiFiTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\NetCfg\BindingWorkItemQueueHandler" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\NetTrace\GatherNetworkInfo" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Offline Files\Background Synchronization" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Offline Files\Logon Synchronization" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\PI\Sqm-Tasks" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Ras\MobilityManager" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\RemoteAssistance\RemoteAssistanceTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Servicing\StartComponentCleanup" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\SettingSync\BackupTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\SettingSync\NetworkStateChangeTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Shell\FamilySafetyMonitor" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Shell\FamilySafetyRefresh" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\SpacePort\SpaceAgentTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\SpacePort\SpaceManagerTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Speech\SpeechModelDownloadTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\User Profile Service\HiveUploadTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WCM\WiFiTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Verification" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Filtering Platform\BfeOnServiceStartTypeChange" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Media Sharing\UpdateLibrary" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Wininet\CacheTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Work Folders\Work Folders Logon Synchronization" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Work Folders\Work Folders Maintenance Work" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Workplace Join\Automatic-Device-Join" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\XblGameSave\XblGameSaveTask" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\XblGameSave\XblGameSaveTaskLogon" /Disable > NUL 2>&1
schtasks /Change /TN "Driver Easy Scheduled Scan" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack2016" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn2016" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Office\Office ClickToRun Service Monitor" /Disable > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_tweaks

REM -- Registry Recovery start
:seq_recoverregistry
COLOR 2F
ECHO.

REM -- Recovers the default Windows registry settings - see Registry Tweaks for detailed information
reg delete "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v NoWindowMinimizingShortcuts /f > NUL 2>&1
reg delete "HKLM\Software\Policies\Microsoft\Windows\Explorer" /v NoWindowMinimizingShortcuts /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v EnableTransparency /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\Personalize" /v ColorPrevalence /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v ColorPrevalence /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v AccentColor /t REG_DWORD /d 0x00d77800 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v Composition /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v ColorizationColor /t REG_DWORD /d 0xc40078d7 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v ColorizationAfterglow /t REG_DWORD /d 0xc40078d7 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v ColorizationGlassAttribute /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\DWM" /v EnableWindowColorization /t REG_DWORD /d 1 /f
reg delete "HKLM\Software\Policies\Microsoft\Windows Defender\MpEngine" /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Driver Signing" /v "Policy" /t REG_BINARY /d "00" /f
reg delete "HKLM\Software\Policies\Microsoft\Windows\System" /v "DisableLogonBackgroundImage" /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Device Metadata" /v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 1 /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "Start_TrackDocs" /f > NUL 2>&1
reg add "HKEY_CLASSES_ROOT\exefile\shellex\ContextMenuHandlers\PintoStartScreen" /t REG_SZ /d {470C0EBD-5D73-4d58-9CED-E91E22E23282} /f > NUL 2>&1
reg add "HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\PintoStartScreen" /t REG_SZ /d {470C0EBD-5D73-4d58-9CED-E91E22E23282} /f > NUL 2>&1
reg add "HKEY_CLASSES_ROOT\mscfile\shellex\ContextMenuHandlers\PintoStartScreen" /t REG_SZ /d {470C0EBD-5D73-4d58-9CED-E91E22E23282} /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\HideDesktopIcons\NewStartPanel" /v "{20D04FE0-3AEA-1069-A2D8-08002B30309D}" /t REG_DWORD /d 1 /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ForceClassicControlPanel" /f > NUL 2>&1
reg add "HKCU\Control Panel\Accessibility\StickyKeys" /v "Flags" /t REG_SZ /d "510" /f
reg add "HKCU\Control Panel\Accessibility\Keyboard Response" /v "Flags" /t REG_SZ /d "126" /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "AllowCortana" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "BingSearchEnabled" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "CortanaEnabled" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Search" /v "SearchboxTaskbarMode" /f > NUL 2>&1
reg delete "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v "AllowCortana" /f > NUL 2>&1
reg delete "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v "DisableWebSearch" /f > NUL 2>&1
reg delete "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWeb" /f > NUL 2>&1
reg delete "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v "ConnectedSearchUseWebOverMeteredConnections" /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\DriverSearching" /v "SearchOrderConfig" /t REG_DWORD /d 1 /f
reg delete "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "Disabled" /t REG_DWORD /d 1 /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d 1 /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "DontSendAdditionalData" /t REG_DWORD /d 1 /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "DontShowUI" /t REG_DWORD /d 1 /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "DontShowUI" /t REG_DWORD /d 1 /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d 1 /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\Windows Error Reporting" /v "LoggingDisabled" /t REG_DWORD /d 1 /f > NUL 2>&1
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "HideFileExt" /t REG_DWORD /d 1 /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "LaunchTo" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v "ShowTaskViewButton" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\SoftLanding" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_TOASTS_ENABLED" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_CRITICAL_TOASTS_ABOVE_LOCK" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_ALLOW_TOASTS_ABOVE_LOCK" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Notifications\Settings" /v "NOC_GLOBAL_SETTING_SUPRESS_TOASTS_WHILE_DUPLICATING" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\PushNotifications" /v "ToastEnabled" /f > NUL 2>&1
reg delete "HKCU\Software\Policies\Microsoft\Windows\CurrentVersion\PushNotifications" /v "NoToastApplicationNotification" /f > NUL 2>&1
reg delete "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v "DisableNotificationCenter" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Associations" /v "DefaultFileTypeRisk" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Attachments" /v "SaveZoneInformation" /f > NUL 2>&1
reg delete "HKCU\Control Panel\Desktop" /v "WaitToKillAppTimeout" /f > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Control" /v "WaitToKillServiceTimeout" /t REG_SZ /d "5000" /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Serialize" /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Schedule\Maintenance" /v "MaintenanceDisabled" /f > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Control\FileSystem" /v "NtfsDisableEncryption" /t REG_DWORD /d 0 /f
reg add "HKLM\System\CurrentControlSet\Control\FileSystem" /v "NtfsDisableLastAccessUpdate" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "ForceActiveDesktopOn" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoActiveDesktop" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoActiveDesktopChanges" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "SmartScreenEnabled" /t REG_SZ /d "Off" /f
reg delete "HKLM\Software\Policies\Microsoft\Windows\Personalization" /v "NoLockScreen" /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowAutoConnectToWiFiSenseHotspots" /v "value" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\PolicyManager\default\WiFi\AllowWiFiHotSpotReporting" /v "value" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Program-Telemetry" /v "Enabled" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v "AllowTelemetry" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\SQMClient\Windows" /v "CEIPEnable" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v "AITEnable" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AdvertisingInfo" /v "DisabledByGroupPolicy" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v "DisableUAR" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\EnhancedStorageDevices" /v "TCGSecurityActivationDisabled" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d 0 /f
reg delete "HKLM\Software\Policies\Microsoft\Windows\SettingSync" /v "DisableSettingSync" /f > NUL 2>&1
reg delete "HKLM\Software\Policies\Microsoft\Windows\SettingSync" /v "DisableSettingSyncUserOverride" /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WINEVT\Channels\Microsoft-Windows-Application-Experience/Steps-Recorder" /v "Enabled" /t REG_DWORD /d 1 /f
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DownloadMode" /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DODownloadMode" /f > NUL 2>&1
reg add "HKCU\Control Panel\Desktop" /v "MenuShowDelay" /t REG_DWORD /d 400 /f
reg add "HKCU\Control Panel\Mouse" /v "MouseHoverTime" /t REG_SZ /d 400 /f
reg delete "HKCU\Control Panel\Desktop" /v "JPEGImportQuality" /f > NUL 2>&1
reg add "HKLM\Software\Policies\Microsoft\Windows\System" /v "EnableSmartScreen" /t "REG_DWORD" /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\AppHost" /v "EnableWebContentEvaluation" /t "REG_DWORD" /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocation" /t "REG_DWORD" /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableLocationScripting" /t "REG_DWORD" /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\LocationAndSensors" /v "DisableWindowsLocationProvider" /t "REG_DWORD" /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Maps" /v "AutoDownloadAndUpdateMapData" /t "REG_DWORD" /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /t REG_SZ /d ""%LocalAppData%\Microsoft\OneDrive\OneDrive.exe" /background" /f
reg add "HKCU\Control Panel\Desktop" /v "ScreenSaveActive" /t REG_SZ /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\GameDVR" /v "AppCaptureEnabled" /t REG_DWORD /d 1 /f
reg add "HKCU\System\GameConfigStore" /v "GameDVR_Enabled" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\GameDVR" /v "AllowgameDVR" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowFrequent" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer" /v "ShowRecent" /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager" /v "SoftLandingEnabled" /t REG_DWORD /d 1 /f
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutorun" /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutorun" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Siuf" /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\WindowsUpdate\UX\Settings" /v "ActiveHoursStart" /t REG_DWORD /d "8" /f
reg add "HKLM\Software\Microsoft\WindowsUpdate\UX\Settings" /v "ActiveHoursEnd" /t REG_DWORD /d "17" /f
reg add "HKEY_CLASSES_ROOT\*\shellex\ContextMenuHandlers\EPP" /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f
reg add "HKEY_CLASSES_ROOT\Directory\shellex\ContextMenuHandlers\EPP" /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f
reg add "HKEY_CLASSES_ROOT\Drive\shellex\ContextMenuHandlers\EPP" /t REG_SZ /d "{09A47860-11B0-4DA5-AFA5-26D86198A780}" /f
reg add "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 1 /f
reg add "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 1 /f > NUL 2>&1
reg add "HKLM\Software\Policies\Microsoft\Biometrics" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\MRT" /v DontReportInfectionInformation /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\AppCompat" /v DisableInventory /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\CredUI" /v DisablePasswordReveal /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\DeliveryOptimization" /v DODownloadMode /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\HandwritingErrorReports" /v PreventHandwritingErrorReports /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\LocationAndSensors" /v DisableSensors /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Personalization" /v NoLockScreenCamera /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\TabletPC" /v PreventHandwritingDataSharing /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v AllowSearchToUseLocation /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v DisableWebSearch /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Windows Search" /v ConnectedSearchUseWeb /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v SpynetReporting /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v SubmitSamplesConsent /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\WMDRM" /v DisableOnline /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\DataCollection" /v AllowTelemetry /t REG_DWORD /d 1 /f
reg add "HKLM\System\ControlSet001\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v Start /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\LooselyCoupled" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Personalization\Settings" /v AcceptedPrivacyPolicy /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\InputPersonalization" /v RestrictImplicitInkCollection /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\InputPersonalization" /v RestrictImplicitTextCollection /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\InputPersonalization\TrainedDataStore" /v HarvestContacts /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Input\TIPC" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\AdvertisingInfo" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{E5323777-F976-4f5b-9B55-B94699C46E44}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{2EEF81BE-33FA-4800-9670-1CD474972C3F}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{992AFA70-6F47-4148-B3E9-3003349C1548}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Control Panel\International\User Profile" /v HttpAcceptLanguageOptOut /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization" /v SystemSettingsDownloadMode /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Suggested Sites" /v Enabled /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer" /v AllowServicePoweredQSA /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\CurrentVersion\Explorer\AutoComplete" /v AutoSuggest /t REG_SZ /d yes /f
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Infodelivery\Restrictions" /v NoUpdateCheck /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Geolocation" /v PolicyDisableGeolocation /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "Use FormSuggest" /t REG_SZ /d yes /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v DoNotTrack /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\Main" /v "FormSuggest Passwords" /t REG_SZ /d yes /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\SearchScopes" /v ShowSearchSuggestionsGlobal /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\MicrosoftEdge\PhishingFilter" /v EnabledV9 /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\WcmSvc\wifinetworkmanager\config" /v AutoConnectAllowedOEM /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\Device Metadata" /v PreventDeviceMetadataFromNetwork /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /t REG_DWORD /d 0 /f
reg add "HKLM\System\CurrentControlSet\Control\WMI\AutoLogger\AutoLogger-Diagtrack-Listener" /v Start /t REG_DWORD /d 1 /f
reg add "HKLM\System\CurrentControlSet\Control\WMI\AutoLogger\SQMLogger" /v Start /t REG_DWORD /d 1 /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Siuf\Rules" /v "NumberOfSIUFInPeriod" /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Siuf\Rules" /v PeriodInNanoSeconds /t REG_DWORD /d 0 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{E5323777-F976-4f5b-9B55-B94699C46E44}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{2EEF81BE-33FA-4800-9670-1CD474972C3F}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{D89823BA-7180-4B81-B50C-7E471E6121A3}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{992AFA70-6F47-4148-B3E9-3003349C1548}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{A8804298-2D5F-42E3-9531-9C8C39EB29CE}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{C1D23ACC-752B-43E5-8448-8D0E519CD6D6}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync" /v SyncPolicy /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Accessibility" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\AppSync" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\BrowserSettings" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Credentials" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\DesktopTheme" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Language" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Personalization" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\StartLayout" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\SettingSync\Groups\Windows" /v Enabled /t REG_DWORD /d 1 /f
reg add "HKLM\System\CurrentControlSet\Services\lfsvc\Service\Configuration" /v Status /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Sensor\Overrides\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v SensorPermissionState /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows NT\CurrentVersion\Sensor\Permissions\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v SensorPermissionState /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\DeviceAccess\Global\{BFA794E4-F964-4FDB-90F6-51056BFE4B44}" /v Value /t REG_SZ /d Allow /f
reg add "HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" /v DisablePreviewDesktop /t REG_DWORD /d 0 /f
taskkill /IM explorer.exe /F & explorer.exe > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_tweaks

REM -- Services recovery start
:seq_recoverservices
COLOR 2F
ECHO.

REM -- Recovers the default Windows services - see Services Tweaks for detailed information
sc config diagnosticshub.standardcollector.service start= auto
net start diagnosticshub.standardcollector.service > NUL 2>&1
sc config DiagTrack start= auto
net start DiagTrack > NUL 2>&1
sc config dmwappushservice start= auto
net start dmwappushservice > NUL 2>&1
sc config OneSyncSvc start= auto
net start OneSyncSvc > NUL 2>&1
sc config RetailDemo start= demand
sc config WSearch start= auto
net start WSearch > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_tweaks

REM -- Recover third party services
:seq_recovertpservices
COLOR 2F
ECHO.
ECHO Recovering third party services...
sc config gupdate start= delayed-auto > NUL 2>&1
net start gupdate > NUL 2>&1
sc config AdobeARMservice start= auto > NUL 2>&1
net start AdobeARMservice > NUL 2>&1
sc config AGSService start= auto > NUL 2>&1
net start AGSService > NUL 2>&1
sc config GfExperienceService start= auto > NUL 2>&1
net start GfExperienceService > NUL 2>&1
sc config AdobeFlashPlayerUpdateSvc start= auto > NUL 2>&1
net start AdobeFlashPlayerUpdateSvc > NUL 2>&1
sc config "AMD External Events Utility" start= auto > NUL 2>&1
net start "AMD External Events Utility" > NUL 2>&1
sc config CxAudMsg start= auto > NUL 2>&1
net start CxAudMsg > NUL 2>&1
sc config SAService start= auto > NUL 2>&1
net start SAService > NUL 2>&1
sc config YandexBrowserService start= auto > NUL 2>&1
net start YandexBrowserService > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_tweaks

REM -- Scheduled Tasks recovery start
:seq_recoverscheduled
COLOR 2F
ECHO.

REM -- Recovers the default Scheduled Tasks
ECHO Recovering Windows scheduled tasks
schtasks /Change /TN "Microsoft\Windows\SettingSync\BackgroundUploadTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 64 Critical" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\.NET Framework\.NET Framework NGEN v4.0.30319 Critical" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\AppID\SmartScreenSpecific" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\ApplicationData\CleanupTemporaryState" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\ApplicationData\DsSvcCleanup" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Application Experience\AitAgent" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Application Experience\ProgramDataUpdater" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Application Experience\StartupAppTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Autochk\Proxy" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\CloudExperienceHost\CreateObjectTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\BthSQM" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Customer Experience Improvement Program\HypervisorFlightingTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Defrag\ScheduledDefrag" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Diagnosis\Scheduled" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\DiskCleanup\SilentCleanup" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\DiskFootprint\Diagnostics" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\DiskFootprint\StorageSense" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\ErrorDetails\EnableErrorDetailsUpdate" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Feedback\Siuf\DmClient" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Feedback\Siuf\DmClientOnScenarioDownload" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\File Classification Infrastructure\Property Definition Sync" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\FileHistory\File History (maintenance mode)" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Management\Provisioning\Logon" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Maintenance\WinSAT" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Maps\MapsToastTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Maps\MapsUpdateTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Mobile Broadband Accounts\MNO Metadata Parser" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Multimedia\SystemSoundsService" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\NlaSvc\WiFiTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\NetCfg\BindingWorkItemQueueHandler" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\NetTrace\GatherNetworkInfo" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Offline Files\Background Synchronization" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Offline Files\Logon Synchronization" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\PI\Sqm-Tasks" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Ras\MobilityManager" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\RemoteAssistance\RemoteAssistanceTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\RetailDemo\CleanupOfflineContent" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Servicing\StartComponentCleanup" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\SettingSync\BackupTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\SettingSync\NetworkStateChangeTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Setup\SetupCleanupTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Shell\FamilySafetyMonitor" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Shell\FamilySafetyRefresh" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Shell\IndexerAutomaticMaintenance" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\SpacePort\SpaceAgentTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\SpacePort\SpaceManagerTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Speech\SpeechModelDownloadTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\TextServicesFramework\MsCtfMonitor" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\TPM\Tpm-HASCertRetr" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\TPM\Tpm-Maintenance" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\User Profile Service\HiveUploadTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WCM\WiFiTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Verification" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Error Reporting\QueueReporting" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Filtering Platform\BfeOnServiceStartTypeChange" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Media Sharing\UpdateLibrary" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Wininet\CacheTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Work Folders\Work Folders Logon Synchronization" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Work Folders\Work Folders Maintenance Work" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Workplace Join\Automatic-Device-Join" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\XblGameSave\XblGameSaveTask" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\XblGameSave\XblGameSaveTaskLogon" /Enable > NUL 2>&1
schtasks /Change /TN "Driver Easy Scheduled Scan" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentFallBack2016" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Office\OfficeTelemetryAgentLogOn2016" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Office\Office ClickToRun Service Monitor" /Enable > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_tweaks

REM -- Features Menu
:menu_features
COLOR 1F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  WINDOWS FEATURES                                   บ
ECHO บ    [1] Disable Windows Defender                     บ
ECHO บ    [2] Disable Hibernation                          บ
ECHO บ    [3] Disable OneDrive                             บ
ECHO บ    [4] Disable Windows Update                       บ
ECHO บ    [5] Remove Windows Apps except store             บ
ECHO บ    [6] Remove all Windows Apps                      บ
ECHO บ    [7] Enable OS compression                        บ
ECHO บ                                                     บ
ECHO บ    [8] Recover Windows Defender                     บ
ECHO บ    [9] Recover Hibernation                          บ
ECHO บ   [10] Recover OneDrive                             บ
ECHO บ   [11] Recover Windows Update                       บ
ECHO บ   [12] Recover all Windows Apps                     บ
ECHO บ   [13] Disable OS compression                       บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Back to Main Menu                            บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu3="Select: "
IF '%menu3%' == '1' GOTO seq_disabledefender
IF '%menu3%' == '2' GOTO seq_disablehybernation
IF '%menu3%' == '3' GOTO seq_disableonedrive
IF '%menu3%' == '4' GOTO seq_disablewinupdate
IF '%menu3%' == '5' GOTO seq_removeappsexceptstore
IF '%menu3%' == '6' GOTO seq_removeapps
IF '%menu3%' == '7' GOTO seq_enablecompression
IF '%menu3%' == '8' GOTO seq_recoverdefender
IF '%menu3%' == '9' GOTO seq_recoverhybernation
IF '%menu3%' == '10' GOTO seq_recoveronedrive
IF '%menu3%' == '11' GOTO seq_recoverwinupdate
IF '%menu3%' == '12' GOTO seq_recoverapps
IF '%menu3%' == '13' GOTO seq_disablecompression
IF '%menu3%' == '0' GOTO menu_start
GOTO menu_start

REM -- Disables Windows Defender
:seq_disabledefender
COLOR 2F
ECHO.
sc config Sense start= disabled > NUL 2>&1
net stop Sense > NUL 2>&1
sc config WdFilter start= disabled > NUL 2>&1
net stop WdFilter > NUL 2>&1
sc config WdNisSvc start= disabled > NUL 2>&1
net stop WdNisSvc Track > NUL 2>&1
sc config WinDefend start= disabled > NUL 2>&1
net stop WinDefend > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\Sense" /v "Start" /t REG_DWORD /d "4" /f > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\WdFilter" /v "Start" /t REG_DWORD /d "4" /f > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\WdNisSvc" /v "Start" /t REG_DWORD /d "4" /f > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\WinDefend" /v "Start" /t REG_DWORD /d "4" /f > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Verification" /Disable > NUL 2>&1
reg delete "HKLM\Software\Policies\Microsoft\Windows Defender" /f > NUL 2>&1
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /v "DisableAntiSpyware" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableBehaviorMonitoring" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableOnAccessProtection" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableRealtimeMonitoring" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Real-Time Protection" /v "DisableScanOnRealtimeEnable" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Reporting" /v "DisableEnhancedNotifications" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v "SpynetReporting" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\SpyNet" /v "SubmitSamplesConsent" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\MpEngine" /v "MpEnablePus" /t REG_DWORD /d 0 /f
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /v "WindowsDefender" /f > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Disables Hybrid Boot aka Hibernation
:seq_disablehybernation
COLOR 2F
ECHO.
reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Power" /v "HiberbootEnabled" /t REG_DWORD /d 0 /f
powercfg /hibernate off > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Disables OneDrive
:seq_disableonedrive
COLOR 2F
ECHO.
taskkill /F /IM OneDrive.exe /T > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /f > NUL 2>&1
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableFileSyncNGSC" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableMeteredNetworkFileSync" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableLibrariesDefaultSaveToOneDrive" /t REG_DWORD /d 1 /f
sc config OneSyncSvc start= disabled
net stop OneSyncSvc > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\OneSyncSvc" /v "Start" /t REG_DWORD /d 4 /f > NUL 2>&1
reg add "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 0 /f
reg add "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 0 /f > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Disables Windows Update so you can update via Windows Update MiniTool instead
:seq_disablewinupdate
COLOR 2F
ECHO.
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\Automatic App Update" /Disable > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /v "AutoDownload" /t REG_DWORD /d 2 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "3G" /t REG_DWORD /d 2 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "4G" /t REG_DWORD /d 2 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "Default" /t REG_DWORD /d 2 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "Ethernet" /t REG_DWORD /d 2 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "WiFi" /t REG_DWORD /d 2 /f > NUL 2>&1
sc config wuauserv start= disabled
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\Reboot" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\Refresh Settings" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_Display" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_ReadyToReboot" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\sih" /Disable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\sihboot" /Disable > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DODownloadMode" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Microsoft\WindowsUpdate\UX\Settings" /v "DeferUpgrade" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /v "ExcludeWUDriversInQualityUpdate" /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "AlwaysAutoRebootAtScheduledTime" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v "NoAutoRebootWithLoggedOnUsers" /t REG_DWORD /d 1 /f
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Removes all windows apps excluding the windows store
:seq_removeappsexceptstore
COLOR 2F
ECHO.
PowerShell.exe -Command "Get-AppxPackage | where-object {$_.name -notlike '*store*'} | Remove-AppxPackage" -ErrorAction SilentlyContinue
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Removes all windows apps including the windows store
:seq_removeapps
COLOR 2F
ECHO.
PowerShell.exe -Command "Get-AppxPackage | Remove-AppxPackage" -ErrorAction SilentlyContinue
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Enables Windows OS compression which uses zip to compress OS files
:seq_enablecompression
COLOR 2F
ECHO.
compact.exe /CompactOS:always /Q
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Recovers the Windows Defender
:seq_recoverdefender
COLOR 2F
ECHO.
sc config Sense start= demand > NUL 2>&1
net start Sense > NUL 2>&1
sc config WdFilter start= boot > NUL 2>&1
net start WdFilter > NUL 2>&1
sc config WdNisSvc start= demand > NUL 2>&1
net start WdNisSvc > NUL 2>&1
sc config WinDefend start= auto > NUL 2>&1
net start WinDefend > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\Sense" /v "Start" /t REG_DWORD /d "3" /f > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\WdFilter" /v "Start" /t REG_DWORD /d "3" /f > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\WdNisSvc" /v "Start" /t REG_DWORD /d "3" /f > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\WinDefend" /v "Start" /t REG_DWORD /d "3" /f > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cache Maintenance" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Cleanup" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Scheduled Scan" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\Windows Defender\Windows Defender Verification" /Enable > NUL 2>&1
reg add "HKLM\Software\Policies\Microsoft\Windows Defender" /f
reg add "HKLM\Software\Policies\Microsoft\Windows Defender\Policy Manager" /f
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Run" /v "WindowsDefender" /t REG_EXPAND_SZ /d "%ProgramFiles%\Windows Defender\MSASCuiL.exe" /f
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Recovers Hybrid Boot
:seq_recoverhybernation
COLOR 2F
ECHO.
reg add "HKLM\System\CurrentControlSet\Control\Session Manager\Power" /v "HiberbootEnabled" /t REG_DWORD /d 1 /f
powercfg /hibernate on > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Recovers OneDrive
:seq_recoveronedrive
COLOR 2F
ECHO.
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Run" /v "OneDrive" /t REG_SZ /d ""C:\Users\Test\AppData\Local\Microsoft\OneDrive\OneDrive.exe" /background"C:\Users\Test\AppData\Local\Microsoft\OneDrive\OneDrive.exe" /background" /f > NUL 2>&1
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableMeteredNetworkFileSync" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /v "DisableLibrariesDefaultSaveToOneDrive" /t REG_DWORD /d 0 /f
reg delete "HKLM\Software\Policies\Microsoft\Windows\OneDrive" /f > NUL 2>&1
sc config OneSyncSvc start= auto
net start OneSyncSvc > NUL 2>&1
reg add "HKLM\System\CurrentControlSet\Services\OneSyncSvc" /v "Start" /t REG_DWORD /d 2 /f > NUL 2>&1
reg add "HKEY_CLASSES_ROOT\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 1 /f
reg add "HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{018D5C66-4533-4307-9B53-224DE2ED1FE6}" /v "System.IsPinnedToNameSpaceTree" /t REG_DWORD /d 1 /f > NUL 2>&1
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Recovers Windows Update
:seq_recoverwinupdate
COLOR 2F
ECHO.
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\Automatic App Update" /Enable > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /v "AutoDownload" /t REG_DWORD /d 4 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "3G" /t REG_DWORD /d 2 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "4G" /t REG_DWORD /d 2 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "Default" /t REG_DWORD /d 1 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "Ethernet" /t REG_DWORD /d 1 /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkList\DefaultMediaCost" /v "WiFi" /t REG_DWORD /d 1 /f > NUL 2>&1
sc config wuauserv start= demand
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\Reboot" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\Refresh Settings" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_Display" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_ReadyToReboot" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\sih" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\sihboot" /Enable > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\DeliveryOptimization\Config" /v "DODownloadMode" /f > NUL 2>&1
reg add "HKLM\Software\Microsoft\WindowsUpdate\UX\Settings" /v "DeferUpgrade" /t REG_DWORD /d 0 /f
reg add "HKLM\Software\Policies\Microsoft\MRT" /v DontOfferThroughWUAU /t REG_DWORD /d 1 /f
reg delete "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate" /f > NUL 2>&1
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Reinstalls all default windows apps
:seq_recoverapps
COLOR 2F
ECHO.
PowerShell.exe -Command "Get-AppxPackage -AllUsers | Foreach {Add-AppxPackage -DisableDevelopmentMode -Register ($_.InstallLocation + '\AppXManifest.xml')}" -ErrorAction SilentlyContinue
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Disables Windows OS compression
:seq_disablecompression
COLOR 2F
ECHO.
compact.exe /CompactOS:never /Q
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_features

REM -- Network Menu
:menu_network
COLOR 1F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  WINDOWS NETWORK                                    บ
ECHO บ    [1] Set Network as Private                       บ
ECHO บ    [2] Set Network as Public                        บ
ECHO บ    [3] Show Network Configuration                   บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Back to Main Menu                            บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu4="Select: "
IF '%menu4%' == '1' GOTO net_setprivate
IF '%menu4%' == '2' GOTO net_setpublic
IF '%menu4%' == '3' GOTO net_showconfig
IF '%menu4%' == '0' GOTO menu_start
GOTO menu_start

REM -- Sets your current network interface to private
:net_setprivate
COLOR 2F
ECHO.
ECHO Loading Current Network(s)...
PowerShell.exe -Command "Get-NetConnectionProfile"
SET /p netindex="Select InterfaceIndex: "
PowerShell.exe -Command "Set-NetConnectionProfile -InterfaceIndex %netindex% -NetworkCategory Private"
ECHO.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_network

REM -- Sets your current network interface to public
:net_setpublic
COLOR 2F
ECHO.
ECHO Loading Current Network(s)...
PowerShell.exe -Command "Get-NetConnectionProfile"
SET /p netindex="Select InterfaceIndex: "
PowerShell.exe -Command "Set-NetConnectionProfile -InterfaceIndex %netindex% -NetworkCategory Public"
ECHO.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_network

REM -- Outputs your current network interfaces
:net_showconfig
COLOR 2F
ECHO.
ipconfig /all
ECHO.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_network

REM -- Diagnostic Menu
:menu_diagnostic
COLOR 1F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  DIAGNOSTIC / REPAIR TOOLS                          บ
ECHO บ    [1] Complete Windows Integrity Check             บ
ECHO บ    [2] Fix Windows Network                          บ
ECHO บ    [3] Fix Windows Update                           บ
ECHO บ    [4] Clean Up Windows                             บ
ECHO บ    [5] Setup System CMD on Login (Safemode)         บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Back to Main Menu                            บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu5="Select: "
IF '%menu5%' == '1' GOTO fix_integrety
IF '%menu5%' == '2' GOTO fix_network
IF '%menu5%' == '3' GOTO fix_winupdate
IF '%menu5%' == '4' GOTO fix_cleanup
IF '%menu5%' == '5' GOTO fix_systemcmd
IF '%menu5%' == '0' GOTO menu_start
GOTO menu_start

REM -- performs an integrety check for system files
:fix_integrety
COLOR 2F
ECHO.
chkdsk /scan
net start RpcLocator > NUL 2>&1
dism /Online /Cleanup-Image /CheckHealth
dism /Online /Cleanup-Image /ScanHealth
dism /Online /Cleanup-Image /RestoreHealth
sfc /scannow
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_diagnostic

REM -- Script to reset network related services and caches
:fix_network
COLOR 2F
ECHO.
sc config BFE start= auto
sc config Dhcp start= auto
sc config Dnscache start= auto
sc config DPS start= auto
sc config lmhosts start= auto
sc config MpsSvc start= auto
sc config NlaSvc start= auto
sc config nsi start= auto
sc config Wcmsvc start= auto
sc config Winmgmt start= auto
sc config NcbService start= demand
sc config Netman start= demand
sc config netprofm start= demand
sc config WinHttpAutoProxySvc start= demand
sc config WlanSvc start= demand
sc config WwanSvc start= demand
net start DPS > NUL 2>&1
net start BFE > NUL 2>&1
net start MpsSvc > NUL 2>&1
net start nsi > NUL 2>&1
net start NlaSvc > NUL 2>&1
net start Dnscache > NUL 2>&1
net start Dhcp > NUL 2>&1
net start Wcmsvc > NUL 2>&1
wmic path win32_networkadapter where index=0 call disable > NUL 2>&1
wmic path win32_networkadapter where index=1 call disable > NUL 2>&1
wmic path win32_networkadapter where index=2 call disable > NUL 2>&1
wmic path win32_networkadapter where index=3 call disable > NUL 2>&1
wmic path win32_networkadapter where index=4 call disable > NUL 2>&1
wmic path win32_networkadapter where index=5 call disable > NUL 2>&1
wmic path win32_networkadapter where index=0 call enable > NUL 2>&1
wmic path win32_networkadapter where index=1 call enable > NUL 2>&1
wmic path win32_networkadapter where index=2 call enable > NUL 2>&1
wmic path win32_networkadapter where index=3 call enable > NUL 2>&1
wmic path win32_networkadapter where index=4 call enable > NUL 2>&1
wmic path win32_networkadapter where index=5 call enable > NUL 2>&1
netsh advfirewall reset > NUL 2>&1
route -f > NUL 2>&1
arp -d * > NUL 2>&1
nbtstat -r > NUL 2>&1
nbtstat -rr > NUL 2>&1
ipconfig /release > NUL 2>&1
ipconfig /renew > NUL 2>&1
ipconfig /flushdns > NUL 2>&1
ipconfig /registerdns > NUL 2>&1
netsh int 6to4 reset all > NUL 2>&1
netsh int httpstunnel reset all > NUL 2>&1
netsh int ipv4 reset all > NUL 2>&1
netsh int ipv6 reset all > NUL 2>&1
netsh int isatap reset all > NUL 2>&1
netsh int portproxy reset all > NUL 2>&1
netsh int tcp reset all > NUL 2>&1
netsh int teredo reset all > NUL 2>&1
netsh winsock reset > NUL 2>&1
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_diagnostic

REM -- Script to reset Windows Update related services, caches and registry keys
:fix_winupdate
COLOR 2F
ECHO.
sc config TrkWks start= auto
net start TrkWks > NUL 2>&1
fsutil usn deletejournal /d /n c: > NUL 2>&1
chkdsk /scan > NUL 2>&1
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies" /f > NUL 2>&1
reg delete "HKCU\Software\Microsoft\WindowsSelfHost" /f > NUL 2>&1
reg delete "HKCU\Software\Policies" /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Policies" /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\Policies" /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate" /f > NUL 2>&1
reg delete "HKLM\Software\Microsoft\WindowsSelfHost" /f > NUL 2>&1
reg delete "HKLM\Software\Policies" /f > NUL 2>&1
reg delete "HKLM\Software\WOW6432Node\Microsoft\Policies" /f > NUL 2>&1
reg delete "HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Policies" /f > NUL 2>&1
reg delete "HKLM\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\WindowsStore\WindowsUpdate" /f > NUL 2>&1
reg delete "HKLM\Software\WOW6432Node\Policies" /f > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\Refresh Settings" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\Schedule Scan" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_Display" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\UpdateOrchestrator\USO_UxBroker_ReadyToReboot" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\Automatic App Update" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\Scheduled Start" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\sih" /Enable > NUL 2>&1
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\sihboot" /Enable > NUL 2>&1
sc config bits start= disabled
sc config cryptSvc start= disabled
sc config UsoSvc start= disabled
sc config winmgmt start= disabled
sc config wuauserv start= disabled
taskkill /im TiWorker.exe /f > NUL 2>&1
net stop bits /y > NUL 2>&1
net stop cryptSvc /y > NUL 2>&1
net stop UsoSvc /y > NUL 2>&1
net stop winmgmt /y > NUL 2>&1
winmgmt /salvagerepository > NUL 2>&1
taskkill /im TiWorker.exe /f > NUL 2>&1
net stop wuauserv /y > NUL 2>&1
rmdir "%systemroot%\SoftwareDistribution\Download\" /s /q > NUL 2>&1
del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr0.dat" > NUL 2>&1
del "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr1.dat" > NUL 2>&1
sc config BFE start= auto
sc config Dhcp start= auto
sc config MpsSvc start= auto
sc config netprofm start= auto
sc config NlaSvc start= auto
sc config nsi start= auto
sc config WinHttpAutoProxySvc start= auto
sc config Wcmsvc start= auto
net start DPS > NUL 2>&1
net start BFE > NUL 2>&1
net start MpsSvc > NUL 2>&1
net start nsi > NUL 2>&1
net start NlaSvc > NUL 2>&1
net start Dhcp > NUL 2>&1
net start BITS > NUL 2>&1
net start wuauserv > NUL 2>&1
net start WinHttpAutoProxySvc > NUL 2>&1
net start Wcmsvc > NUL 2>&1
wmic path win32_networkadapter where index=0 call disable > NUL 2>&1
wmic path win32_networkadapter where index=1 call disable > NUL 2>&1
wmic path win32_networkadapter where index=2 call disable > NUL 2>&1
wmic path win32_networkadapter where index=3 call disable > NUL 2>&1
wmic path win32_networkadapter where index=4 call disable > NUL 2>&1
wmic path win32_networkadapter where index=5 call disable > NUL 2>&1
wmic path win32_networkadapter where index=0 call enable > NUL 2>&1
wmic path win32_networkadapter where index=1 call enable > NUL 2>&1
wmic path win32_networkadapter where index=2 call enable > NUL 2>&1
wmic path win32_networkadapter where index=3 call enable > NUL 2>&1
wmic path win32_networkadapter where index=4 call enable > NUL 2>&1
wmic path win32_networkadapter where index=5 call enable > NUL 2>&1
route -f > NUL 2>&1
arp -d * > NUL 2>&1
nbtstat -r > NUL 2>&1
nbtstat -rr > NUL 2>&1
ipconfig /release > NUL 2>&1
ipconfig /renew > NUL 2>&1
ipconfig /flushdns > NUL 2>&1
ipconfig /registerdns > NUL 2>&1
Dism /Online /Cleanup-Image /RestoreHealth > NUL 2>&1
Dism /Online /Cleanup-Image /StartComponentCleanup > NUL 2>&1
cleanmgr /sageset:65535 & cleanmgr /sagerun:65535
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_diagnostic

REM -- Removes various junk like temp files, shadowcopies and recyclebin
:fix_cleanup
COLOR 2F
ECHO.
fsutil usn deletejournal /d /n c: > NUL 2>&1
chkdsk /scan > NUL 2>&1
Dism /Online /Cleanup-Image /CheckHealth > NUL 2>&1
Dism /Online /Cleanup-Image /StartComponentCleanup /ResetBase > NUL 2>&1
winmgmt /salvagerepository > NUL 2>&1
compact /CompactOs:never > NUL 2>&1
del "%temp%\*" /s /f /q > NUL 2>&1
del "C:\$Recycle.bin\*" /s /f /q > NUL 2>&1
del "D:\$Recycle.bin\*" /s /f /q > NUL 2>&1
del "%systemroot%\temp\*" /s /f /q > NUL 2>&1
vssadmin delete shadows /for=c: /all /quiet > NUL 2>&1
cleanmgr /sageset:65535 & cleanmgr /sagerun:65535
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_diagnostic

REM -- Checks current system state (normal or safemode)
:fix_systemcmd
COLOR 2F
wmic COMPUTERSYSTEM GET BootupState | findstr /i "fail-safe" > NUL
IF %errorlevel% EQU 0 GOTO fix_safemode
IF %errorlevel% EQU 1 GOTO fix_normalmode

REM -- If running in Safemode, gives option to install the system CMD on Login screen
:fix_safemode
ECHO System running in Safemode. Do you want to install or uninstall System CMD^? [install^|uninstall]
SET /p systemcmd="Select: "
IF '%systemcmd%' == 'install' GOTO systemcmdinstall
IF '%systemcmd%' == 'uninstall' GOTO systemcmduninstall

REM -- Takes own of utilman.exe, creates a backup and replaces utilman.exe with cmd.exe
:systemcmdinstall
ECHO Installing System CMD on Login...
icacls "%SYSTEMROOT%\system32\Utilman.exe" /grant:r %username%:F /T /C /Q > NUL 2>&1
IF NOT EXIST "%SYSTEMROOT%\system32\Utilman.bak" (COPY /Y "%SYSTEMROOT%\system32\Utilman.exe" "%SYSTEMROOT%\system32\Utilman.bak") > NUL 2>&1
DEL "%SYSTEMROOT%\system32\Utilman.exe" > NUL 2>&1
COPY /Y "%SYSTEMROOT%\system32\cmd.exe" "%SYSTEMROOT%\system32\Utilman.exe" > NUL 2>&1
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
msconfig
GOTO menu_diagnostic

REM -- Reverts original utilman.exe
:systemcmduninstall
ECHO Uninstalling System CMD on Login...
DEL "%SYSTEMROOT%\system32\Utilman.exe" > NUL 2>&1
COPY /Y "%SYSTEMROOT%\system32\Utilman.bak" "%SYSTEMROOT%\system32\Utilman.exe" > NUL 2>&1
ECHO.
ECHO Done...
ECHO You should reboot your computer now.
ECHO Press any key to got back to the menu.
PAUSE > NUL
msconfig
GOTO menu_diagnostic

REM -- If running in normal mode, just shows a warning message
:fix_normalmode
ECHO.
ECHO Note: This needs to be done in Windows Safemode, otherwise it won't work.
ECHO Restart your computer and boot into Safemode (minimal).
ECHO.
ECHO Press any key to got back to the menu.
PAUSE > NUL
msconfig
GOTO menu_diagnostic

REM -- Activation Menu
:menu_activation
COLOR 1F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  WINDOWS ACTIVATION TOOLS                           บ
ECHO บ    [1] Uninstall Windows Key                        บ
ECHO บ    [2] Install Windows Key                          บ
ECHO บ    [3] Change KMS Server                            บ
ECHO บ    [4] Inject Windows GVLK Key                      บ
ECHO บ    [5] Inject Office GVLK Key                       บ
ECHO บ    [6] Show Windows/Office Activation Status        บ
ECHO บ    [7] Activate Windows/Office with KMS             บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Back to Main Menu                            บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu6="Select: "
IF '%menu6%' == '1' GOTO act_uninstallkey
IF '%menu6%' == '2' GOTO act_installkey
IF '%menu6%' == '3' GOTO act_changekms
IF '%menu6%' == '4' GOTO act_injectkeywindows
IF '%menu6%' == '5' GOTO act_injectkeyoffice
IF '%menu6%' == '6' GOTO act_activationstatus
IF '%menu6%' == '7' GOTO act_activatenow
IF '%menu6%' == '0' GOTO menu_start
GOTO menu_start

REM -- Uninstalls the current Windows key
:act_uninstallkey
COLOR 2F
ECHO.
START /WAIT slmgr -upk
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_activation

REM -- Option to manually install a new Windows key
:act_installkey
COLOR 2F
ECHO.
SET /p winkey="Insert Key: "
START /WAIT slmgr -ipk %winkey%
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_activation

REM -- Checks for current activation status for Windows and Office
:act_activationstatus
COLOR 2F
ECHO.
START /WAIT slmgr /dli
IF EXIST "%programfiles(x86)%\Microsoft Office\Office14\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office14\" > NUL 2>&1
IF EXIST "%programfiles(x86)%\Microsoft Office\Office15\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office15\" > NUL 2>&1
IF EXIST "%programfiles(x86)%\Microsoft Office\Office16\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office16\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office14\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office14\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office15\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office15\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office16\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office16\" > NUL 2>&1
CD %opath% > NUL 2>&1
cscript ospp.vbs /dstatus
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_activation

REM -- Simple routine to change the current KMS server
:act_changekms
COLOR 2F
ECHO.
SET /p kmsserver="KMS Server IP: "
SET /p kmsport="KMS Server Port: "
IF EXIST "%programfiles(x86)%\Microsoft Office\Office14\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office14\" > NUL 2>&1
IF EXIST "%programfiles(x86)%\Microsoft Office\Office15\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office15\" > NUL 2>&1
IF EXIST "%programfiles(x86)%\Microsoft Office\Office16\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office16\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office14\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office14\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office15\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office15\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office16\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office16\" > NUL 2>&1
CD %opath% > NUL 2>&1
ECHO Setting KMS Server to: %kmsserver%:%kmsport%...
cscript ospp.vbs /sethst:%kmsserver%
cscript ospp.vbs /setprt:%kmsport%
START /WAIT slmgr /skms %kmsserver%:%kmsport%
START /WAIT slmgr /skhc
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_activation

REM -- Windows Activation Menu
:act_injectkeywindows
COLOR 1F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  INJECT WINDOWS GVLK KEY                            บ
ECHO บ    [1] Windows 10 Professional                      บ
ECHO บ    [2] Windows 10 Professional N                    บ
ECHO บ    [3] Windows 10 Education                         บ
ECHO บ    [4] Windows 10 Education N                       บ
ECHO บ    [5] Windows 10 Enterprise                        บ
ECHO บ    [6] Windows 10 Enterprise N                      บ
ECHO บ    [7] Windows 10 Enterprise 2015 LTSB              บ
ECHO บ    [8] Windows 10 Enterprise 2015 LTSB N            บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Back to Activation Menu                      บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu7="Select: "
IF '%menu7%' == '1' GOTO key_w10_1
IF '%menu7%' == '2' GOTO key_w10_2
IF '%menu7%' == '3' GOTO key_w10_3
IF '%menu7%' == '4' GOTO key_w10_4
IF '%menu7%' == '5' GOTO key_w10_5
IF '%menu7%' == '6' GOTO key_w10_6
IF '%menu7%' == '7' GOTO key_w10_7
IF '%menu7%' == '8' GOTO key_w10_8
IF '%menu7%' == '0' GOTO menu_activation
GOTO act_injectkeywindows

REM -- Uninstalls current Windows key and injects GVLK key
:key_w10_1
COLOR 2F
START /WAIT slmgr -upk
START /WAIT slmgr -ipk W269N-WFGWX-YVC9B-4J6C9-T83GX
GOTO key_end

:key_w10_2
COLOR 2F
START /WAIT slmgr -upk
START /WAIT slmgr -ipk MH37W-N47XK-V7XM9-C7227-GCQG9
GOTO key_end

:key_w10_3
COLOR 2F
START /WAIT slmgr -upk
START /WAIT slmgr -ipk NW6C2-QMPVW-D7KKK-3GKT6-VCFB2
GOTO key_end

:key_w10_4
COLOR 2F
START /WAIT slmgr -upk
START /WAIT slmgr -ipk 2WH4N-8QGBV-H22JP-CT43Q-MDWWJ
GOTO key_end

:key_w10_5
COLOR 2F
START /WAIT slmgr -upk
START /WAIT slmgr -ipk NPPR9-FWDCX-D2C8J-H872K-2YT43
GOTO key_end

:key_w10_6
COLOR 2F
START /WAIT slmgr -upk
START /WAIT slmgr -ipk DPH2V-TTNVB-4X9Q3-TJR4H-KHJW4
GOTO key_end

:key_w10_7
COLOR 2F
START /WAIT slmgr -upk
START /WAIT slmgr -ipk WNMTR-4C88C-JK8YV-HQ7T2-76DF9
GOTO key_end

:key_w10_8
COLOR 2F
START /WAIT slmgr -upk
START /WAIT slmgr -ipk 2F77B-TNFGY-69QQF-B8YKP-D69TJ
GOTO key_end

:key_end
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_activation

REM -- Office Activation Menu
:act_injectkeyoffice
COLOR 1F
IF EXIST "%programfiles(x86)%\Microsoft Office\Office14\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office14\" > NUL 2>&1
IF EXIST "%programfiles(x86)%\Microsoft Office\Office15\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office15\" > NUL 2>&1
IF EXIST "%programfiles(x86)%\Microsoft Office\Office16\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office16\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office14\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office14\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office15\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office15\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office16\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office16\" > NUL 2>&1
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  INJECT WINDOWS GVLK KEY                            บ
ECHO บ    [1] Office Professional Plus 2016                บ
ECHO บ    [2] Office Standard 2016                         บ
ECHO บ    [3] Office Professional Plus 2013                บ
ECHO บ    [4] Office Standard 2013                         บ
ECHO บ    [5] Office Professional Plus 2010                บ
ECHO บ    [6] Office Home and Student 2010                 บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Back to Activation Menu                      บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu8="Select: "
IF '%menu8%' == '1' GOTO key_o16_1
IF '%menu8%' == '2' GOTO key_o16_2
IF '%menu8%' == '3' GOTO key_o13_1
IF '%menu8%' == '4' GOTO key_o13_2
IF '%menu8%' == '5' GOTO key_o10_1
IF '%menu8%' == '6' GOTO key_o10_2
IF '%menu8%' == '0' GOTO menu_activation
GOTO act_injectkeyoffice

REM -- Office GVLK key injection
:key_o16_1
COLOR 2F
cd %opath%
cscript ospp.vbs /inpkey:XQNVK-8JYDB-WJ9W3-YJ8YR-WFG99
GOTO key_endoffice

:key_o16_2
COLOR 2F
cd %opath%
cscript ospp.vbs /inpkey:JNRGM-WHDWX-FJJG3-K47QV-DRTFM
GOTO key_endoffice

:key_o13_1
COLOR 2F
cd %opath%
cscript ospp.vbs /inpkey:YC7DK-G2NP3-2QQC3-J6H88-GVGXT
GOTO key_endoffice

:key_o13_2
COLOR 2F
cd %opath%
cscript ospp.vbs /inpkey:KBKQT-2NMXY-JJWGP-M62JB-92CD4
GOTO key_endoffice

:key_o10_1
COLOR 2F
cd %opath%
cscript ospp.vbs /inpkey:MKCGC-FBXRX-BMJX6-F3Q8C-2QC6P
GOTO key_endoffice

:key_o10_2
COLOR 2F
cd %opath%
cscript ospp.vbs /inpkey:PXVMG-8F9K6-9GQYX-VJB66-FH626
GOTO key_endoffice

:key_endoffice
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_activation

REM -- Looks for Office installation folders and activates both Windows and Office
:act_activatenow
COLOR 2F
ECHO.
START /WAIT slmgr /ato
IF EXIST "%programfiles(x86)%\Microsoft Office\Office14\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office14\" > NUL 2>&1
IF EXIST "%programfiles(x86)%\Microsoft Office\Office15\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office15\" > NUL 2>&1
IF EXIST "%programfiles(x86)%\Microsoft Office\Office16\OSPP.VBS" SET opath="%programfiles(x86)%\Microsoft Office\Office16\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office14\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office14\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office15\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office15\" > NUL 2>&1
IF EXIST "%programfiles%\Microsoft Office\Office16\OSPP.VBS" SET opath="%programfiles%\Microsoft Office\Office16\" > NUL 2>&1
CD %opath% > NUL 2>&1
cscript ospp.vbs /act
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_activation

REM -- Anti-Ransomware Menu
:menu_fakeprocess
COLOR 1F
CLS
ECHO ษอออออออออออออออออออออออออออออออออออออออออออออออออออออป
ECHO บ         WINDOWS 10 TNBT: THE NEXT BIG TWEAK         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  CURRENT REVISION: v%V%                           บ
ECHO บ  AUTHOR: SEBASTIAN KOEHLING                         บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ  DETECTED WINDOWS: %B%       บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ                                                     บ
ECHO บ  ANTI-RANSOMWARE PROCESS FAKER                      บ
ECHO บ    [1] Start Process Faker                          บ
ECHO บ    [2] Stop Process Faker                           บ
ECHO บ    [3] Install Process Faker (Autorun)              บ
ECHO บ    [4] Uninstall Process Faker                      บ
ECHO บ                                                     บ
ECHO บ    [5] What is this Process Faker anyway^?           บ
ECHO บ                                                     บ
ECHO ฬอออออออออออออออออออออออออออออออออออออออออออออออออออออน
ECHO บ    [0] Back to Main Menu                            บ
ECHO ศอออออออออออออออออออออออออออออออออออออออออออออออออออออผ
ECHO.
SET /p menu9="Select: "
IF '%menu9%' == '1' GOTO rsw_start
IF '%menu9%' == '2' GOTO rsw_stop
IF '%menu9%' == '3' GOTO rsw_install
IF '%menu9%' == '4' GOTO rsw_uninstall
IF '%menu9%' == '5' GOTO rsw_info
IF '%menu9%' == '0' GOTO menu_start
GOTO menu_fakeprocess

REM -- Creates processfaker.ps1 and runs it manually
:rsw_start
COLOR 2F
ECHO.
IF EXIST "%~dp0processfaker.ps1" DEL "%~dp0processfaker.ps1"
ECHO param([Parameter(Mandatory=$true)][string]$action)							>> "%~dp0processfaker.ps1"
ECHO $fakeProcesses = @("wireshark.exe", "vmacthlp.exe", "VBoxService.exe",				>> "%~dp0processfaker.ps1"
ECHO     "VBoxTray.exe", "procmon.exe", "ollydbg.exe", "vmware-tray.exe",				>> "%~dp0processfaker.ps1"
ECHO     "idag.exe", "ImmunityDebugger.exe", "idaq.exe",						>> "%~dp0processfaker.ps1"
ECHO     "idaq64.exe")											>> "%~dp0processfaker.ps1"
ECHO if ($action -ceq "start") {									>> "%~dp0processfaker.ps1"
ECHO     $tmpdir = [System.Guid]::NewGuid().ToString()							>> "%~dp0processfaker.ps1"
ECHO     $binloc = Join-path $env:temp $tmpdir								>> "%~dp0processfaker.ps1"
ECHO     New-Item -Type Directory -Path $binloc								>> "%~dp0processfaker.ps1"
ECHO     $oldpwd = $pwd											>> "%~dp0processfaker.ps1"
ECHO     Set-Location $binloc										>> "%~dp0processfaker.ps1"
ECHO     foreach ($proc in $fakeProcesses) {								>> "%~dp0processfaker.ps1"
ECHO         Copy-Item c:\windows\system32\ping.exe "$binloc\$proc"					>> "%~dp0processfaker.ps1"
ECHO         Start-Process ".\$proc" -WindowStyle Hidden -ArgumentList "-t -w 600000000 -4 1.1.1.1"	>> "%~dp0processfaker.ps1"
ECHO         write-host "[+] Process $proc spawned"							>> "%~dp0processfaker.ps1"
ECHO     }												>> "%~dp0processfaker.ps1"
ECHO     Set-Location $oldpwd										>> "%~dp0processfaker.ps1"
ECHO }													>> "%~dp0processfaker.ps1"
ECHO elseif ($action -ceq "stop") {									>> "%~dp0processfaker.ps1"
ECHO     foreach ($proc in $fakeProcesses) {								>> "%~dp0processfaker.ps1"
ECHO         Stop-Process -processname "$proc".Split(".")[0]						>> "%~dp0processfaker.ps1"
ECHO         write-host "[+] Killed $proc"								>> "%~dp0processfaker.ps1"
ECHO     }												>> "%~dp0processfaker.ps1"
ECHO }													>> "%~dp0processfaker.ps1"
ECHO else {												>> "%~dp0processfaker.ps1"
ECHO     write-host "Bad usage: need '-action start' or '-action stop' parameter"			>> "%~dp0processfaker.ps1"
ECHO }													>> "%~dp0processfaker.ps1"
PowerShell.exe -ExecutionPolicy Unrestricted -File "%~dp0processfaker.ps1" -action start -ErrorAction SilentlyContinue
DEL "%~dp0processfaker.ps1"
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_fakeprocess

REM -- Creates processfaker.ps1 and stops it manually
:rsw_stop
COLOR 2F
ECHO.
IF EXIST "%~dp0processfaker.ps1" DEL "%~dp0processfaker.ps1"
ECHO param([Parameter(Mandatory=$true)][string]$action)							>> "%~dp0processfaker.ps1"
ECHO $fakeProcesses = @("wireshark.exe", "vmacthlp.exe", "VBoxService.exe",				>> "%~dp0processfaker.ps1"
ECHO     "VBoxTray.exe", "procmon.exe", "ollydbg.exe", "vmware-tray.exe",				>> "%~dp0processfaker.ps1"
ECHO     "idag.exe", "ImmunityDebugger.exe", "idaq.exe",						>> "%~dp0processfaker.ps1"
ECHO     "idaq64.exe")											>> "%~dp0processfaker.ps1"
ECHO if ($action -ceq "start") {									>> "%~dp0processfaker.ps1"
ECHO     $tmpdir = [System.Guid]::NewGuid().ToString()							>> "%~dp0processfaker.ps1"
ECHO     $binloc = Join-path $env:temp $tmpdir								>> "%~dp0processfaker.ps1"
ECHO     New-Item -Type Directory -Path $binloc								>> "%~dp0processfaker.ps1"
ECHO     $oldpwd = $pwd											>> "%~dp0processfaker.ps1"
ECHO     Set-Location $binloc										>> "%~dp0processfaker.ps1"
ECHO     foreach ($proc in $fakeProcesses) {								>> "%~dp0processfaker.ps1"
ECHO         Copy-Item c:\windows\system32\ping.exe "$binloc\$proc"					>> "%~dp0processfaker.ps1"
ECHO         Start-Process ".\$proc" -WindowStyle Hidden -ArgumentList "-t -w 600000000 -4 1.1.1.1"	>> "%~dp0processfaker.ps1"
ECHO         write-host "[+] Process $proc spawned"							>> "%~dp0processfaker.ps1"
ECHO     }												>> "%~dp0processfaker.ps1"
ECHO     Set-Location $oldpwd										>> "%~dp0processfaker.ps1"
ECHO }													>> "%~dp0processfaker.ps1"
ECHO elseif ($action -ceq "stop") {									>> "%~dp0processfaker.ps1"
ECHO     foreach ($proc in $fakeProcesses) {								>> "%~dp0processfaker.ps1"
ECHO         Stop-Process -processname "$proc".Split(".")[0]						>> "%~dp0processfaker.ps1"
ECHO         write-host "[+] Killed $proc"								>> "%~dp0processfaker.ps1"
ECHO     }												>> "%~dp0processfaker.ps1"
ECHO }													>> "%~dp0processfaker.ps1"
ECHO else {												>> "%~dp0processfaker.ps1"
ECHO     write-host "Bad usage: need '-action start' or '-action stop' parameter"			>> "%~dp0processfaker.ps1"
ECHO }													>> "%~dp0processfaker.ps1"
PowerShell.exe -ExecutionPolicy Unrestricted -File "%~dp0processfaker.ps1" -action stop -ErrorAction SilentlyContinue
DEL "%~dp0processfaker.ps1"
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_fakeprocess

REM -- Creates processfaker.ps1, copys it to C:\Windows and creates a script in autorun folder to automatically run the script on boot
:rsw_install
COLOR 2F
ECHO.
IF EXIST "%SYSTEMROOT%\processfaker.ps1" DEL "%SYSTEMROOT%\processfaker.ps1"
ECHO param([Parameter(Mandatory=$true)][string]$action)							>> "%SYSTEMROOT%\processfaker.ps1"
ECHO $fakeProcesses = @("wireshark.exe", "vmacthlp.exe", "VBoxService.exe",				>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     "VBoxTray.exe", "procmon.exe", "ollydbg.exe", "vmware-tray.exe",				>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     "idag.exe", "ImmunityDebugger.exe", "idaq.exe",						>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     "idaq64.exe")											>> "%SYSTEMROOT%\processfaker.ps1"
ECHO if ($action -ceq "start") {									>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     $tmpdir = [System.Guid]::NewGuid().ToString()							>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     $binloc = Join-path $env:temp $tmpdir								>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     New-Item -Type Directory -Path $binloc								>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     $oldpwd = $pwd											>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     Set-Location $binloc										>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     foreach ($proc in $fakeProcesses) {								>> "%SYSTEMROOT%\processfaker.ps1"
ECHO         Copy-Item c:\windows\system32\ping.exe "$binloc\$proc"					>> "%SYSTEMROOT%\processfaker.ps1"
ECHO         Start-Process ".\$proc" -WindowStyle Hidden -ArgumentList "-t -w 600000000 -4 1.1.1.1"	>> "%SYSTEMROOT%\processfaker.ps1"
ECHO         write-host "[+] Process $proc spawned"							>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     }												>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     Set-Location $oldpwd										>> "%SYSTEMROOT%\processfaker.ps1"
ECHO }													>> "%SYSTEMROOT%\processfaker.ps1"
ECHO elseif ($action -ceq "stop") {									>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     foreach ($proc in $fakeProcesses) {								>> "%SYSTEMROOT%\processfaker.ps1"
ECHO         Stop-Process -processname "$proc".Split(".")[0]						>> "%SYSTEMROOT%\processfaker.ps1"
ECHO         write-host "[+] Killed $proc"								>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     }												>> "%SYSTEMROOT%\processfaker.ps1"
ECHO }													>> "%SYSTEMROOT%\processfaker.ps1"
ECHO else {												>> "%SYSTEMROOT%\processfaker.ps1"
ECHO     write-host "Bad usage: need '-action start' or '-action stop' parameter"			>> "%SYSTEMROOT%\processfaker.ps1"
ECHO }													>> "%SYSTEMROOT%\processfaker.ps1"
IF EXIST "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Process_Faker.bat" DEL "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Process_Faker.bat"
ECHO ^@ECHO OFF																	> "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Process_Faker.bat"
ECHO PowerShell.exe -ExecutionPolicy Unrestricted -File "%SYSTEMROOT%\processfaker.ps1" -action start -ErrorAction SilentlyContinue		>> "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Process_Faker.bat"
ECHO EXIT																	>> "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Process_Faker.bat"
PowerShell.exe -ExecutionPolicy Unrestricted -File "%SYSTEMROOT%\processfaker.ps1" -action stop -ErrorAction SilentlyContinue > NUL 2>&1
PowerShell.exe -ExecutionPolicy Unrestricted -File "%SYSTEMROOT%\processfaker.ps1" -action start -ErrorAction SilentlyContinue
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_fakeprocess

REM -- Simply stops the process faker and deletes the files created by the installer script
:rsw_uninstall
COLOR 2F
ECHO.
PowerShell.exe -ExecutionPolicy Unrestricted -File "%SYSTEMROOT%\processfaker.ps1" -action stop -ErrorAction SilentlyContinue
IF EXIST ""%SYSTEMROOT%\processfaker.ps1"" DEL ""%SYSTEMROOT%\processfaker.ps1"" > NUL 2>&1
IF EXIST "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Process_Faker.bat" DEL "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\Process_Faker.bat" > NUL 2>&1
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_fakeprocess

REM -- Just outputs some information text about process faker
:rsw_info
COLOR 2F
ECHO.
ECHO "Simulate fake processes of analysis sandbox/VM that some malware will try to evade.
ECHO This script will just spawn ping.exe with different names (wireshark.exe, vboxtray.exe, etc.)"
ECHO Source: https://gist.github.com/x0rz/e8b36fee33b87aa7e4e5dfd4c0cfc1a6
ECHO.
ECHO Done...
ECHO Press any key to got back to the menu.
PAUSE > NUL
GOTO menu_fakeprocess