Pages

Thursday, January 30, 2014

While doing some cleaning up on a test computer around the office, we realized that we’ve never written about how to block an application from running using a registry hack. It’s easy, so here you go.

It’s worth noting that this doesn’t work for blocking things that will be running as services, and a lot of spyware and malware abuses the built-in Windows rundll32 utility to run their stuff without actually using an executable. This technique won’t work for that.

Once you get to that key, create a new 32-bit DWORD called DisallowRun in the right-hand pane with the value set to 1. Then create a key under the Explorer key on the left-hand pane, and call it DisallowRun as well. If some of those keys don’t exist, you’ll want to right-click and create the keys like you can see in the next screenshot.

On the right-hand side underneath the DisallowRun key, you’ll want to create a bunch of String values with names starting with “1″ and going in numerical order (so the second one would be “2″ and the third “3″, etc). Set the value of each one to the name of the executable that you want to block. For instance, if you wanted to block Calculator and Notepad from running, you’d add two keys like this:

1 notepad.exe2 calc.exe

This will end up looking something like the following screenshot:

Once you set this restriction and restart your computer, you can immediately see the change by just trying to run the application — you’ll get a popup that looks like the first screenshot in this article.

Alternative: Use this Pre-Made Registry Hack

So you don’t want to do all of that. Open up Notepad, paste in this text, adjust the name of the applications listed in the file, and save it out as SomeFileName.reg, making sure to end the filename in .reg so it’ll be usable. Then double-click on the file.