Applications - Prevent Running Specified Programs

How to Prevent Users from Running Specified Programs in Windows

   Information
This tutorial will show you how to prevent all or specific users on the computer from being able to run a list of disallowed program EXE files you specify in Vista, Windows 7, or Windows 8.

You must be logged in as an administrator to be able to do the steps in this tutorial.

   Warning
This will not prevent users from being able to run a program through the command prompt unless you also add cmd.exe to the list of disallowed applications.

If you have an .exe file of a program in the list of allowed applications and also in the list of disallowed applications, then users will not be able to run the .exe. Anything disallowed will always override anything allowed.

Renaming an .exe file will bypass the list of disallowed programs to let it run anyways, but not with the list of allowed programs. If the .exe file name is not on the list of allowed programs, then it can't run.

This does not apply to "Metro" Store apps in Windows 8.


EXAMPLE: Message
NOTE: This is a message that all users will get when they try to run a EXE file on the list of disallowed programs that you specified.
Message.jpg



OPTION ONE

Through the Local Group Policy Editor


1. Open the all users, specific users or groups, or all users except administrators Local Group Policy Editor for how you want this policy applied.

2. In the left pane, click/tap on to expand User Configuration, Administrative Templates, and System. (see screenshot below)
GPEDIT-1.jpg
3. In the right pane of System, double click/tap on Don't run specified Windows applications to edit it. (see screenshot above)

4. To Allow All Applications to Run
A) Select (dot) either Not Configured or Disabled, and go to step 6 below. (see screenshot below)
NOTE: Not configured is the default setting.
GPEDIT-2.jpg
5. To Prevent Specified Applications from Running
A) Select (dot) Enabled, then click/tap on the Show button under Options. (see screenshot above)

B) Under Value, double click/tap in a blank line and type in the name of the EXE file (ex: cmd.exe) with file extension that you want to prevent from running. (see screenshots below)


   Tip

  • To change or remove a listed exe file name, you can just type over it.
  • To clear or reset the list of disallowed applications, you can select Not Configured (step 4), click/tap on Apply, select Enabled again, and click/tap on Apply.
GPEDIT-3A.jpg

GPEDIT-3B.jpg

C) Repeat step 5B until you have added any other EXE files (ex: CCleaner) you want on the list of disallowed applications as well. When finished, click/tap on OK. (see screenshots above)

D) Go to step 6 below.
6. Click/tap on OK. (see screenshot below step 4A)

7. If used, you may also wish to make changes to your list of allowed programs to run.

8. Close the Local Group Policy Editor window.





OPTION TWO

Manually in Registry Editor


NOTE: This option affects all users on the computer.
1. Press the Windows + R keys to open the Run dialog, type regedit, and click/tap on OK.

2. If prompted by UAC, click/tap on Yes (Windows 7/8) or Continue (Vista).

3. In regedit, navigate to the location below. (see screenshot below)
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Reg1.jpg
4. To Prevent Specified Applications from Running for Only Current User
A) In the right pane of Explorer, right click or press and hold on a empty space, and click/tap on New and DWORD (32-bit) Value. (see screenshot below)
Enable-1.jpg
B) Type in DisallowRun and press Enter. Double click/tap on DisallowRun to modify it. (see screenshot below)
Enable-2.jpg
C) Type in 1 and click/tap on OK. (see screenshot below)
Enable-3.jpg
D) In the left pane, right click or press and hold on Explorer, click/tap on New and Key, type in DisallowRun, and press Enter. (see screenshot below)
Enable-4.jpg
E) In the right pane of DisallowRun, right click or press and hold on a empty space, and click/tap on New and String Value. (see screenshot below)
Enable-5.jpg
F) Type in the number (1 to ....) of the order that this EXE file will be in the list of disallowed applications and press Enter. Double click/tap on this number to modify it. (see screenshot below)
NOTE: For example, you would type 1 if this is the first EXE in the list, 2 if it's the second, 3 for the third, etc........
Enable-6.jpg

Enable-8.jpg

G) Type in the name of the EXE file (ex: cmd.exe) with file extension that you want to prevent from running, and click/tap on OK. (see screenshot below)
Enable-7.jpg

   Tip

  • To change a listed EXE file name, double click/tap on the number of the EXE to modify it (step 4F), type the new EXE name, and click/tap on OK.
  • To remove a listed EXE file name, right click on the number of the EXE, then click/tap on Delete and Yes.

H) Repeat steps 4F and 4G until you have added any other EXE files (ex: #2 CCleaner) you want on the list of disallowed applications as well.
Enable-8.jpg
I) When finished, go to step 6 below.
5. To Allow All Applications to Run for Only Current User
NOTE: This is the default setting.
A) In the right pane of Explorer, right click on DisallowRun and click/tap on Delete. (see screenshot below)
Disable-1.jpg
B) Click/tap on Yes to approve. (see screenshot below)
Disable-2.jpg
C) In the left pane, right click or press and hold on DisallowRun, and click/tap on Delete. (see screenshot below)
Enable-9.jpg
D) Click/tap on Yes to approve, go to step 6 below. (see screenshot below)
Disable-4.jpg
6. If used, you may also wish to make changes to your list of allowed programs to run.

7. Close regedit.

8. Log off and log on, or restart the computer to apply.
That's it,
Shawn






 
Last edited:
problem

Hi, my application goal that i would like to disallow it but in the second option don't worked for me, in the option 2 i tested and checked it in either win 7 and 8 but don't work correctly ! please help me if some thing is needed after that , thank you
 

My Computer My Computer

At a glance

Windows 7 Home Premium 32bit.
Computer type
PC/Desktop
OS
Windows 7 Home Premium 32bit.

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
problem

i did all of the steps in the picture above that you posted. and after doing all of these the application are opening again and dont stopped ever. i attached some pictures here maybe you understand my says !
 

Attachments

  • 1.PNG
    1.PNG
    14.4 KB · Views: 717
  • 2.PNG
    2.PNG
    21.3 KB · Views: 753
  • 3.PNG
    3.PNG
    79.5 KB · Views: 762

My Computer My Computer

At a glance

Windows 7 Home Premium 32bit.
Computer type
PC/Desktop
OS
Windows 7 Home Premium 32bit.
Your settings look good to me. Did you restart the computer to apply?
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
thank you admin after i restarted my pc this option worked as well ,
i don't want the error be appear when i clicked on the icon, can be without any errors and opening without windows ? (Nothing happen after clicking)

69273d1272176300-applications-prevent-running-specified-programs-message.jpg

 

My Computer My Computer

At a glance

Windows 7 Home Premium 32bit.
Computer type
PC/Desktop
OS
Windows 7 Home Premium 32bit.

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
is the problem solved in windows 8 or 8.1 ?
i dont want the application error's appear on the windows display ?
 

My Computer My Computer

At a glance

Windows 7 Home Premium 32bit.
Computer type
PC/Desktop
OS
Windows 7 Home Premium 32bit.
Avacs,

The message is by design and serves as a notice for why users are not able to run the .exe. They will always show when a restricted app has been attempted to be opened.
 

My Computer My Computer

At a glance

64-bit Windows 11 Pro for WorkstationsIntel i7-8700K OC'd to 5 GHz64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600...ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top