How to Block the Execution of an Application or EXE File in Windows

Table of contents:

How to Block the Execution of an Application or EXE File in Windows
How to Block the Execution of an Application or EXE File in Windows
Anonim

This article shows you how to prevent an application from running on a computer running Windows. A program from running can be prevented by directly editing the Windows Registry. This procedure can be performed on any computer with the operating system manufactured by Microsoft.

Steps

Part 1 of 3: Access the Registry Policies Key

Block an Application or. EXE from Running in Windows Step 1
Block an Application or. EXE from Running in Windows Step 1

Step 1. Access the "Start" menu by clicking the icon

Windowsstart
Windowsstart

It features the Windows logo and is located in the lower left corner of the desktop.

You will need to perform this step using the user account of the person who you do not want to be able to run the application or program under consideration

Block an Application or. EXE from Running in Windows Step 2
Block an Application or. EXE from Running in Windows Step 2

Step 2. Type in the keywords regedit

Windows will search your computer for the "Registry Editor" program.

Block an Application or. EXE from Running in Windows Step 3
Block an Application or. EXE from Running in Windows Step 3

Step 3. Select the regedit icon

It is characterized by a blue cube formed by the collection of smaller cubes. It should have appeared at the top of the "Start" menu.

Block an Application or. EXE from Running in Windows Step 4
Block an Application or. EXE from Running in Windows Step 4

Step 4. Press the Yes button when prompted

This will bring up the Registry Editor user interface.

If you are not using a computer administrator user account, you will not be able to access the registry

Block an Application or. EXE from Running in Windows Step 5
Block an Application or. EXE from Running in Windows Step 5

Step 5. Open the "Policies" folder

Follow these instructions:

  • Double-click the "HKEY_CURRENT_USER" key. It is visible in the upper left of the window;
  • Double click the "Software" folder. It appeared after you expanded the "HKEY_CURRENT_USER" section of the tree menu;
  • Double-click the "Microsoft" folder;
  • Double click on the "Windows" item;
  • Access the "CurrentVersion" key by double clicking on it.
Block an Application or. EXE from Running in Windows Step 6
Block an Application or. EXE from Running in Windows Step 6

Step 6. Select the "Policies" folder with a single mouse click

It is contained within the "CurrentVersion" key. In this way the keys and values stored inside will be displayed in the right part of the window.

Part 2 of 3: Creating Blocked Program Keys

Block an Application or. EXE from Running in Windows Step 7
Block an Application or. EXE from Running in Windows Step 7

Step 1. Enter the Edit menu

It is visible in the upper left of the Registry Editor window. A small drop-down menu will appear.

Within the menu, you will see the options relating to the currently selected folder or registry key

Block an Application or. EXE from Running in Windows Step 8
Block an Application or. EXE from Running in Windows Step 8

Step 2. Choose the New option

It is the first item on the menu Edit starting from the top. This will bring up a submenu.

Block an Application or. EXE from Running in Windows Step 9
Block an Application or. EXE from Running in Windows Step 9

Step 3. Select the Key item

It is the first option in the submenu that appeared starting from the top. A new directory will be created under the "Policies" folder, visible in the left sidebar of the window.

Block an Application or. EXE from Running in Windows Step 10
Block an Application or. EXE from Running in Windows Step 10

Step 4. Type the name Explorer and press the Enter key

A new folder named "Explorer" will be created under the "Policies" key.

Block an Application or. EXE from Running in Windows Step 11
Block an Application or. EXE from Running in Windows Step 11

Step 5. Select the "Explorer" folder

Click it with the mouse. It is located inside the left sidebar of the window.

Block an Application or. EXE from Running in Windows Step 12
Block an Application or. EXE from Running in Windows Step 12

Step 6. Enter the Edit menu

It is visible in the upper left of the Registry Editor window.

Block an Application or. EXE from Running in Windows Step 13
Block an Application or. EXE from Running in Windows Step 13

Step 7. Choose the New item, then choose the option DWORD (32-bit) value.

A new item will be created inside the "Explorer" folder.

Block an Application or. EXE from Running in Windows Step 14
Block an Application or. EXE from Running in Windows Step 14

Step 8. Type the name DisallowRun and press the Enter key

The new element just created will be renamed with the words "DisallowRun".

Block an Application or. EXE from Running in Windows Step 15
Block an Application or. EXE from Running in Windows Step 15

Step 9. Select the DisallowRun value with a double mouse click

The "Edit 32-bit DWORD Value" dialog box for the "DisallowRun" element appears.

Block an Application or. EXE from Running in Windows Step 16
Block an Application or. EXE from Running in Windows Step 16

Step 10. Change the value assigned to the "DisallowRun" element

Type the value 1 into the "Value data" field, then press the Enter button.

Block an Application or. EXE from Running in Windows Step 17
Block an Application or. EXE from Running in Windows Step 17

Step 11. Select the "Explorer" folder again

The key in question is visible in the left bar of the window under the heading "Policies".

Block an Application or. EXE from Running in Windows Step 18
Block an Application or. EXE from Running in Windows Step 18

Step 12. Create a new key

Access the menu Edit, select the item New one and choose the option Key.

Block an Application or. EXE from Running in Windows Step 19
Block an Application or. EXE from Running in Windows Step 19

Step 13. Type the name DisallowRun and press the Enter key

This will create a new folder inside the "Explorer" key called "DisallowRun".

Part 3 of 3: Adding Programs to Block

Block an Application or. EXE from Running in Windows Step 20
Block an Application or. EXE from Running in Windows Step 20

Step 1. Select the "DisallowRun" key

Click with the mouse the one you just created inside the "Explorer" folder visible in the left sidebar of the window.

Block an Application or. EXE from Running in Windows Step 21
Block an Application or. EXE from Running in Windows Step 21

Step 2. Create a new value of type string

Access the menu Edit, choose the option New one and select the item String value.

Block an Application or. EXE from Running in Windows Step 22
Block an Application or. EXE from Running in Windows Step 22

Step 3. Type the character 1 and press the Enter key

The new element just created will be renamed with the word "1".

Block an Application or. EXE from Running in Windows Step 23
Block an Application or. EXE from Running in Windows Step 23

Step 4. Edit the value of the newly created string

Select the item

Step 1. with a double click of the mouse to open the "Edit string" window.

Block an Application or. EXE from Running in Windows Step 24
Block an Application or. EXE from Running in Windows Step 24

Step 5. Enter the name of the application to block

Type the name of the program you want to prevent from running, then add the.exe extension. Use the "Value data" text field.

  • For example, if you need to block the Windows "Notepad" program from running, you will need to type the following text notepad.exe into the indicated field.
  • To find the name of the executable file associated with a program or application, select the relative icon in the "File Explorer" or "Explorer" window, access the tab Home, choose the option Property and press the button Open file path, finally take note of the highlighted file name.
Block an Application or. EXE from Running in Windows Step 25
Block an Application or. EXE from Running in Windows Step 25

Step 6. Press the OK button

This way the changes made to the edited item will be saved. The newly created string value is used to prevent the program it is associated with from running.

If you need to add other programs, create their string values by naming them in numerical succession (for example "2", "3", "4", etc.)

Block an Application or. EXE from Running in Windows Step 26
Block an Application or. EXE from Running in Windows Step 26

Step 7. Close Registry Editor and restart your computer

At the end of the restart procedure, by logging into the system using the same user account that you used to modify the Windows registry you will not be able to run the programs in question.

Advice

  • If you are using the Pro or Enterprise version of Windows 10, you can block a program from running using the Group Policy Editor. If you need more details on this, you can consult this page of the Microsoft website.
  • Be very careful when editing the Windows registry. Incorrectly changing the value of any of the keys not specifically mentioned in the article or accidentally deleting an item in the Windows registry can damage the operating system or programs installed on your computer.

Recommended: