Prevent exe from running on Windows by file name


There are several different ways to prevent executable from running on Windows. Here is a trick how to prevent it from running by file name, no matter where that exe located, what permissions does it have and etc.

Assume your unwanted exe is bloatware.exe. Consider the following .reg snippet:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\bloatware.exe]

So it creates a registry key bloatware.exe and adds a value pwned named debugger.

It has the following meaning: if someone tries to run bloatware.exe, then, instead of direct run, OS will run pwned.exe and pass bloatware.exe as a commandline parameter. As you can see from the value name, this feature is designed for debugging purposes. In our case we don't need a debugger. We need to prevent it from running. So all you need to do is to put there any executable that will do nothing.

Rate this post:
Share this page:

See also how to:

How to prevent Google Chrome from running its useless unwanted bloatware on Windows