This script is designed to run 24/7, periodically terminating processes and stopping services required for Windows Update to download & install automatically. The script also terminates certain common installers. It is designed to be a "set it and forget it" tool for managing irregular system behavior resulting from Automatically initiated attempts to modify Window's files against Microsoft's "Database".
- Hotkey Control: Use hotkeys to start, pause, and stop the script.
- Process Management: Automatically closes a specified list of processes and logs the closures.
- Service Management: Checks for running services, stops them if necessary, and logs the action.
- Robust Logging: A corrected and reliable logging system writes all actions to a file and the console.
- Window Event Handling: Closes specific pop-up windows if they appear.
- Process Priority: Allows setting process priority for all instances of an application by name using a hotkey.
- Priority Watchdog: Locks a specific process ID to a chosen priority and automatically restores it if anything changes it. Monitors continuously until the process exits. Supports multiple PIDs simultaneously.
- Customizable: Easily configure log paths, log levels, the target process/service lists, and the tray icon.
Shift + F1: Toggles the script's main loop betweenonandoff. When toggled on, the script runs continuously, checking and closing processes and services as needed. Each press is logged with its action (starting/pausing).ScrollLock + PAUSE: Terminates the script immediately.Shift + Ctrl + 9: Opens a dialog to set the priority of a specific process by name (all instances).Ctrl + Alt + Shift + 9: Opens a dialog to enter a Process ID and desired priority. The script immediately sets that priority, then silently monitors the PID every ~10 seconds. If anything changes the priority, the script restores it automatically. Monitoring stops when the process exits. Press the hotkey multiple times to watch additional PIDs simultaneously.
- Log File: The script logs events to
C:\login\closure_log.txtby default. This path is generated from%HOMEDRIVE%\login\closure_log.txtand can be customized by editing theGlobal $sLogFilevariable. - Log Levels:
0: Errors only.1: Basic logging.2: Detailed logging (default).
- Console Logging: Enabled by default for real-time monitoring when running from an editor. To disable, set
Global $bLogToConsole = False.
The script automatically terminates the following processes:
taskhostw.exeTiWorker.exeCompatTelRunner.exeVSSVC.exemsiexec.exenet.exevmcompute.exemsedge.exe- To fight against force ms-edge usagehelppane.exe- To fight against force ms-edge usagemsedgewebview2.exe- To fight against force ms-edge usageAggregatorHost.exedllhost.exeUserOOBEBroker.exeTCPSVCS.EXETrustedInstaller.exe- To Prevent Automated Software Installs (Applies to mal-ware prevention)update.exe- To Prevent Automated Software Installs (Applies to mal-ware prevention)
The script stops the following services if they are running:
TrustedInstaller- To Prevent Automated Software Installs (Applies to mal-ware prevention)wuauserv(Windows Update)UsoSvc(Update Orchestrator Service)DoSvc(Delivery Optimization)WaaSMedicSvc(Windows Update Medic Service)sppsvc(Software Protection Service)
Special handling is implemented for sppsvc to ensure proper termination.
-
Requirements: Ensure you have AutoIt installed if you want to run or edit the
.au3source code. The compiled.exefrom the Releases page does not require an AutoIt installation. -
Icon: (Optional) To use a custom icon, edit
Global $iconfilewith the path to your desired.icofile. -
Log File: (Optional) Edit
Global $sLogFileto your preferred log file location. -
Processes and Services: (Optional) Customize the
$sProcessesand$aServiceNamesarrays to include the processes and services you want to manage. -
Logging Configuration: (Optional)
- Adjust
$iLogLevel(0=Errors only, 1=Basic logging, 2=Detailed logging). - Set
$bLogToConsoletoTrueorFalse.
- Adjust
The easiest way to use the script is to download the executable from the Releases page and launch it.
- DOWNLOAD EXE FROM
RELEASES - Use
Shift + F1to toggle the script between stopped/started states. - Use
Shift + Ctrl + 9to set the priority of all instances of a named process. - Use
Ctrl + Alt + Shift + 9to lock a specific PID to a priority and auto-restore it if changed. - Check the log file for details on script actions.
_miscpopups() function is specific to the author's system. This function checks for specific window classes (e.g., TPleaseRegisterForm for Advanced Renamer) and closes them. You can safely disable this if you don't use the targeted software.
To disable this function:
- Comment out the line
_miscpopups()inside theToggleScript()function. - Comment out or delete the
_miscpopups()function definition.
- The script requires administrative privileges to run (
#RequireAdmin). - The default paths for the icon and log file are hardcoded and may need to be updated for your system.
- Feature: Added
Ctrl+Alt+Shift+9hotkey — Priority Watchdog.- Prompts for a Process ID and target priority level (0=Idle through 5=Real-time).
- Sets the priority immediately on confirmation.
- Monitors the PID every ~10 seconds via
AdlibRegister; restores priority if drift is detected. - Self-unregisters cleanly when the process exits.
- Supports multiple simultaneous PIDs — each hotkey press adds to the watchlist.
- Notifications use
ToolTip()instead ofTrayTip()to avoid Windows 10/11 large toast popups.
- Fix: Replaced
_WinAPI_GetPriorityClasswrapper with directkernel32.dllDllCallto resolve unreliable@errorpropagation in AutoIt 3.3.16.x. - Fix: Switched process handle access flag from
PROCESS_QUERY_INFORMATION(0x0400) toPROCESS_QUERY_LIMITED_INFORMATION(0x1000) for broader process compatibility on Windows 10. - Fix: Updated
ServiceControl.au3include path to new repo location. - Fix: Added missing
$PROCESS_IDLEconstant not present in this AutoIt version'sAutoItConstants.au3.
- Fix: Overhauled the logging system to resolve a critical bug where log entries were not being written to the file after initialization.
- Fix: Corrected the startup logic to prevent a race condition where an old log file could be deleted without a new one being created.
- Refactor: Replaced
LocalwithDimfor variables in the global scope to eliminate all AU3Check compiler warnings. - Refactor: Removed redundant
ConsoleWritecalls to streamline logging and prevent duplicate output. - Docs: Updated README with corrected hotkeys (
Shift+Ctrl+9), log paths, and a detailed new changelog entry.