Skip to content

A lightweight Windows utility that automatically monitors and terminates specified processes. Perfect for keeping your system clean from unwanted applications that keep restarting.

License

Notifications You must be signed in to change notification settings

michal-flaska/task-cleaner

Repository files navigation

task cleaner banner

A lightweight Windows utility that automatically monitors and terminates specified processes. Perfect for keeping your system clean from unwanted applications that keep restarting.

Note

This tool is for legitimate system administration purposes. Use responsibly and only on your own systems. Terminating system processes can cause instability or data loss.

Also please dont use the startup module for your malware projects.

Features

  • Automatic Process Monitoring - Continuously scans running processes at configurable intervals
  • JSON Configuration - Easy-to-edit configuration file for managing target processes
  • Auto-Startup - Registers itself to run on Windows startup automatically
  • Minimal Resource Usage - Efficient monitoring with low CPU and memory footprint
  • Silent Operation - Runs hidden in the background without interrupting your workflow
  • File Logging - Logs all activity to task-cleaner.log next to the executable for troubleshooting

Why Does Windows Block This App?

Smart App Control (SAC)

If you're on Windows 11 with Smart App Control enabled, it will block the app entirely with no "Run anyway" option. SAC blocks all unsigned executables with no reputation - there's no way around it other than disabling it.

To disable: Settings → Privacy & Security → Windows Security → App & browser control → Smart App Control → Off

SmartScreen

If SAC is off but you still get a "Windows protected your PC" warning, that's SmartScreen. This happens because:

  1. Unsigned Executable - The application isn't signed with a code signing certificate
  2. Administrator Privileges - Task Cleaner requires admin rights to terminate processes
  3. Startup Registration - The app modifies the Windows Registry to auto-start
  4. Low Reputation - New executables without an established download history are flagged

To bypass: click More info then Run anyway.

Configuration

Edit config.json to customize which processes to monitor:

{
  "processes": [
    "CalculatorApp.exe",
    "notepad.exe"
  ],
  "check_interval_ms": 1000
}
  • processes - List of executable names to terminate (case-insensitive)
  • check_interval_ms - How often to scan for processes (in milliseconds). Values below 100ms are clamped to 100ms automatically.

Building from Source

Requirements

  • Visual Studio 2022 (or newer)
  • Windows SDK 10.0
  • C++20 support

Steps

  1. Clone the repository:
    git clone https://github.com/michal-flaska/task-cleaner.git
    cd task-cleaner
  2. Open task-cleaner.sln in Visual Studio
  3. Build the solution (Ctrl+Shift+B or F7)
  4. The executable will be in x64/Release/task-cleaner.exe

Usage

  1. Configure target processes in config.json
  2. Run task-cleaner.exe as Administrator
  3. The application will:
    • Hide its console window
    • Register itself for auto-startup (first run only)
    • Begin monitoring and terminating target processes

To stop the application, use Task Manager to end the task-cleaner.exe process.

Troubleshooting

If something isn't working, check task-cleaner.log next to the executable. It logs every action the app takes - process kills, startup registration, and any errors. If the app isn't killing processes or isn't starting up, the answer will be in there.

Technical Details

  • Language: C++20
  • Platform: Windows (uses Win32 API)
  • Dependencies: nlohmann/json (header-only, included)
  • Privileges: Requires Administrator rights to terminate processes

Uninstalling

  1. Kill the process via Task Manager (task-cleaner.exe)
  2. Remove the registry entry:
    • Open Registry Editor (regedit) as Administrator
    • Navigate to HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run
    • Delete the TaskCleaner entry
  3. Delete the executable, config file, and log file

About

A lightweight Windows utility that automatically monitors and terminates specified processes. Perfect for keeping your system clean from unwanted applications that keep restarting.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages