This batch file is designed to perform several tweaks and customizations to the Windows operating system.
It will significantly reduce load on your system. Running this from my experience on average will drop CPU usage by 8-15 points.
Here's a breakdown of what the script does:
Echo Off:
The script starts with @echo off to prevent commands from being displayed in the command prompt window as they are executed.
System Restore:
The script uses PowerShell to enable system restore on the C: drive and creates a restore point named "PreBatchPCHF." This acts as a safeguard, allowing users to revert the system to this point if necessary.
Stopping and Renaming System Services:
The script forcefully stops several Windows services and executables like DeviceCensus.exe, SearchHost.exe, ElevocControlService.exe, textinputhost.exe, smartscreen.exe, and StartMenuExperienceHost.exe.
It then uses icacls to grant full control permissions to everyone, effectively removing any security restrictions on these files.
These executables are renamed with a .bak extension, likely to disable them from being run again in their current state.
Registry Modifications:
The script makes various changes to the Windows registry to disable or modify certain system features, such as telemetry, prefetching, driver searching during updates, Windows Update for drivers, and several service start types.
Disabling Scheduled Tasks:
- It disables a series of scheduled tasks related to system diagnostics, experience improvement programs, defragmentation, disk diagnostics, feedback systems, maps updates, and more.
- This reduces system resource use for these tasks and modifies user experience components.
Power Management and Features:
- Disables the "HypervisorPlatform" Windows Optional Feature via PowerShell.
- Turns off hibernation with powercfg -h off.
- Turns off BitLocker encryption on the C: and D: drives using manage-bde -off.
- Modifies file system behaviors, such as disabling last access time updates and encrypting paging files.
Finally, the script schedules an immediate system reboot using shutdown -r to apply the changes made by the script.
Bleow is an explanation of what each command does.
Download the Batch file from HERE.
Or...
Create and run batch file.
Open a notepad and copy the entire content of the code box below.
Do not copy the word code!
Paste the txt into the notepad. Save the file to your desktop as Tune.bat
Now you will right click the on Tune.bat and run as administrator.
Code:
@echo off
powershell -Command "Enable-ComputerRestore -Drive 'C:\'"
wmic.exe /Namespace:\\root\default Path SystemRestore Call CreateRestorePoint "PreBatchPCHF", 100, 7
taskkill /F /IM DeviceCensus.exe
icacls "%windir%\System32\DeviceCensus.exe" /grant Everyone:F
rename "%windir%\System32\DeviceCensus.exe" DeviceCensus.bak
taskkill /F /IM SearchHost.exe
icacls "%windir%\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\SearchHost.exe" /grant Everyone:F
move "%windir%\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\SearchHost.exe" "C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\SearchHost.exe.bak"
taskkill /f /im searchhost.exe
icacls "%windir%\systemapps\LKG\MicrosoftWindows.LKG.Search_cw5n1h2txyew\SearchHost.exe" /grant Everyone:F
move /Y "%windir%\systemapps\LKG\MicrosoftWindows.LKG.Search_cw5n1h2txyew\SearchHost.exe" "%windir%\systemapps\LKG\MicrosoftWindows.LKG.Search_cw5n1h2txyew\SearchHost.exe.bak"
taskkill /f /im elevoccontrolservice.exe
icacls "%windir%\system32\ElevocInstallDriver\ElevocControlService.exe" /grant Everyone:F
move /Y "%windir%\system32\ElevocInstallDriver\ElevocControlService.exe" "%windir%\system32\ElevocInstallDriver\ElevocControlService.exe.bak"
taskkill /f /im elevoccontrolservice.exe
icacls "%windir%\Drivers\Audio\Source\ThirdParty\E0828\ElevocAPO64\ElevocControlService.exe" /grant Everyone:F
move /Y "C:\Drivers\Audio\Source\ThirdParty\E0828\ElevocAPO64\ElevocControlService.exe" "C:\Drivers\Audio\Source\ThirdParty\E0828\ElevocAPO64\ElevocControlService.exe.bak"
taskkill /F /IM textinputhost.exe
icacls "%windir%\System32\textinputhost.exe" /grant Everyone:F
move "%windir%\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\textinputhost.exe" "%windir%\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy\textinputhost.bak"
taskkill /F /IM smartscreen.exe
icacls "%windir%\System32\smartscreen.exe" /grant Everyone:F
move "%windir%\System32\smartscreen.exe" "%windir%\System32\smartscreen.bak"
taskkill /F /IM StartMenuExperienceHost.exe
icacls "%windir%\System32\StartMenuExperienceHost.exe" /grant Everyone:F
move "%windir%\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.exe" "%windir%\SystemApps\Microsoft.Windows.StartMenuExperienceHost_cw5n1h2txyewy\StartMenuExperienceHost.bak"
icacls "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" /grant Everyone:F
move "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy" "%windir%\SystemApps\Microsoft.Windows.Cortana_cw5n1h2txyewy.bak"
reg add "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\PrefetchParameters" /v EnablePrefetcher /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main" /v "AllowPrelaunch" /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\MicrosoftEdge\TabPreloader" /v "AllowTabPreloading" /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" /v ExcludeWUDriversInQualityUpdate /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\DriverSearching" /v SearchOrderConfig /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsUpdate\UpdatePolicy\PolicyState" /v ExcludeWUDrivers /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\FrameServer" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\FrameServerMonitor" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DolbyDAXAPI" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\WpcMonSvc" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\lfsvc" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\RasAuto" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\RasMan" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\RemoteAccess" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SessionEnv" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\TermService" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\UmRdpService" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\SysMain" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\BDESVC" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\GameInputSvc" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\XblAuthManager" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\XblGameSave" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\XboxGipSvc" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\XboxNetApiSvc" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\BcastDVRUserService_3e312" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\DiagTrack" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\WSearch" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\WbioSrvc" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\HvHost" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\vmickvpexchange" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\vmicguestinterface" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\vmicshutdown" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\vmicheartbeat" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\vmicvmsession" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\vmicrdv" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\vmictimesync" /v "Start" /t REG_DWORD /d "4" /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\vmicvss" /v "Start" /t REG_DWORD /d "4" /f
schtasks /Change /TN "\Microsoft\Windows\AppID\SmartScreenSpecific" /Disable
schtasks /Change /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Appraiser" /Disable
schtasks /Change /TN "\Microsoft\Windows\Application Experience\ProgramDataUpdater" /Disable
schtasks /Change /TN "\Microsoft\Windows\Application Experience\StartupAppTask" /Disable
schtasks /Change /TN "\Microsoft\Windows\CloudExperienceHost\CreateObjectTask" /Disable
schtasks /Change /TN "\Microsoft\Windows\Customer Experience Improvement Program\Consolidator" /Disable
schtasks /Change /TN "\Microsoft\Windows\Customer Experience Improvement Program\KernelCeipTask" /Disable
schtasks /Change /TN "\Microsoft\Windows\Customer Experience Improvement Program\UsbCeip" /Disable
schtasks /Change /TN "\Microsoft\Windows\Defrag\ScheduledDefrag" /Disable
schtasks /Change /TN "\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticDataCollector" /Disable
schtasks /Change /TN "\Microsoft\Windows\DiskDiagnostic\Microsoft-Windows-DiskDiagnosticResolver" /Disable
schtasks /Change /TN "\Microsoft\Windows\DiskFootprint\Diagnostics" /Disable
schtasks /Change /TN "\Microsoft\Windows\Feedback\Siuf\DmClient" /Disable
schtasks /Change /TN "\Microsoft\Windows\Location\Notifications" /Disable
schtasks /Change /TN "\Microsoft\Windows\Location\WindowsActionDialog" /Disable
schtasks /Change /TN "\Microsoft\Windows\Maps\MapsToastTask" /Disable
schtasks /Change /TN "\Microsoft\Windows\Maps\MapsUpdateTask" /Disable
schtasks /Change /TN "\Microsoft\Windows\NetTrace\GatherNetworkInfo" /Disable
schtasks /Change /TN "\Microsoft\Windows\Offline Files\Background Synchronization" /Disable
schtasks /Change /TN "\Microsoft\Windows\Offline Files\Logon Synchronization" /Disable
schtasks /Change /TN "\Microsoft\Windows\RemoteAssistance\RemoteAssistanceTask" /Disable
schtasks /Change /TN "\Microsoft\Windows\Shell\FamilySafetyMonitor" /Disable
schtasks /Change /TN "\Microsoft\Windows\Shell\FamilySafetyRefresh" /Disable
schtasks /Change /TN "\Microsoft\Windows\Shell\IndexerAutomaticMaintenance" /Disable
schtasks /Change /TN "\Microsoft\Windows\WindowsUpdate\Automatic App Update" /Disable
schtasks /Change /TN "\Microsoft\Windows\Work Folders\Work Folders Logon Synchronization" /Disable
schtasks /Change /TN "\Microsoft\Windows\Work Folders\Work Folders Maintenance Work" /Disable
schtasks /Change /TN "\Microsoft\Windows\Workplace Join\Automatic-Device-Join" /Disable
powershell Disable-WindowsOptionalFeature -Online -FeatureName "HypervisorPlatform"
powercfg -h off
manage-bde -off C:
manage-bde -off D:
fsutil behavior set DisableLastAccess 1
fsutil behavior set EncryptPagingFile 0
shutdown -r
In Conjunction with running this batch file I suggest:
EdgeBlock
O&O Shutup Ten
Move it to your documents folder.
Right click run as admin.
Go to actions, apply all settings.
Create the restore point when prompted.
Follow thru the prompts, and reboot if needed to apply the settings.
GeekUninstaller >View Microsoft Store Apps -- Remove anything you do not use, including one drive and Cortana.
System Ninja
Overall, this script drastically modifies the system to potentially enhance performance by disabling non-essential services, features, and telemetry. It may also increase privacy by reducing Microsoft's data collection and telemetry activities.