Today I heard my machine’s fans spin up although it was supposed to do nothing and I knew it was time to kill the CompatTelRunner again.
Disabling all spy options in Windows 11 does not really help, so the only thing that works is to kill the executable with fire until it rises again after the next update like an evil Phoenix from hell.
It’s the same dumb task each time:
– change ownership of file
– get write access
– delete
– create a dummy replacement
– make it inaccessible by everyone
Today I thought “Let’s Aiden create a script that I can run each time, maybe even in autostart if necessary.”
The plan
The client I used was Cline this time and the prompt was:
please implement a windows 11 batch script that disables the "C:\Windows\System32\CompatTelRunner.exe" process by following these steps: change the owner of that file to Scanix (QUBE\Scanix), change permissions to get write access, then delete it. Afterwards create a new empty text file (with the name "CompatTelRunner.exe") in its place and change the permissions, so that noone has write access to it and cannot delete it.
I have used the /deep-thinking action in plan mode. The plan looked like this:
(I don’t think my username or the computer name is a secret worth anonymizing ^^)
Implementation Plan for CompatTelRunner.exe Disabler
Overview
This script will disable the Windows Compatibility Telemetry Runner (CompatTelRunner.exe) by replacing it with an empty file that has restrictive permissions, preventing Windows from re-creating or executing it.
Technical Approach
The batch script will use these Windows commands:
1. takeown - Takes ownership of the target file
2. icacls - Modifies Access Control Lists (permissions)
3. del /f - Force deletes the original executable
4. type nul > filename - Creates an empty file
5. icacls with deny rules - Sets restrictive permissions
Key Considerations
• The script must be run as Administrator to modify System32 files
• The user "Scanix" from domain "QUBE" will become the owner
• The replacement file will have .exe extension but contain no executable code
• Permissions will deny write/delete access to all users including Administrators
Questions Before Implementation
1. Should the script include a confirmation prompt before making changes, or should it run silently?
2. For the final permissions, you mentioned "noone has write access and cannot delete it" - should this also apply to the owner (Scanix), or should Scanix retain full control for potential future restoration?
3. Should I include error handling that checks if each command succeeds before proceeding to the next step?
Aaaand… I just realized that I completely ignored his questions and simply switched to act mode. ^-^
The script
The first model I tried with this was “zai-org/glm-4.7-flash” which does not seem to work very well in this case and produced a non-working script, ending up in an endless loop adding pause calls to it.
The second model was “qwen3.5-27b” and it instantly nailed it (after adding some korean characters to the name of the batch file, which it fixed by itself).
At first it used the “continue anyway” approach when the switch of the ownership or one of the other tasks failed, but a short message from me made him change it.
The resulting batch works fine and will be used by me from now on.
========================================
CompatTelRunner.exe Disabler
========================================
Target: C:\Windows\System32\CompatTelRunner.exe
New Owner: QUBE\Scanix
[Step 1/5] Taking ownership of CompatTelRunner.exe...
[Step 2/5] Changing owner to QUBE\Scanix...
[Step 3/5] Granting full permissions...
[Step 4/5] Deleting CompatTelRunner.exe...
[Step 5/5] Creating empty replacement file...
Setting restrictive permissions on replacement file...
========================================
Operation Complete
========================================
CompatTelRunner.exe has been replaced with an empty file.
The replacement file is owned by QUBE\Scanix and has restrictive permissions.
Note: Windows may attempt to restore this file during updates.
You may need to re-run this script after major Windows updates.
Drücken Sie eine beliebige Taste . . .
I will attach it here to save it for the future (make sure to change the OWNER name to yours if you want to try it).



