Method 2: Using Registry Editor (For All Windows Versions)
1. Open Registry Editor
Press Win + R, type regedit, and press Enter.
2. Navigate to the Path
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explore
r
3. Create a New DWORD Value
Right-click on Explorer, choose New → DWORD (32-bit) Value.
Name it DisallowRun and set the Value Data to 1.
4. Create a Subkey to Block Specific Apps
Right-click Explorer, select New → Key, name it DisallowRun.
Inside this key, create a new string value and name it 1.
Set the Value Data to setup.exe (or any installer you want to block).
5. Restart the PC.