How to Block EXE Files in Download Folders Using Intune AppLocker
Question details
The user needs to prevent executable (.exe) files from running in specific download folders on Windows devices managed by Intune.

- Product
- Microsoft Intune
- Device & OS
- Windows
- Scenario
- Enforcing endpoint security by restricting the execution of potentially unverified or malicious executable files downloaded to user directories.
- Observed behavior
- Intune configuration policies do not have native folder-specific executable blocking without utilizing AppLocker rules, requiring customized enforcement configurations.
Ensure you have administrative access to the Microsoft Intune admin center and test devices available, as deploying incorrect AppLocker policies can block essential system processes.
Use AppLocker via Intune Custom OMA-URI
Create an AppLocker XML policy that allows system apps while explicitly denying executables in download paths, and deploy it through Intune.
Because Intune lacks a simple toggle to block executables in specific folders, you must generate an AppLocker policy locally, export it as an XML file, and distribute it to your endpoints using a Custom Configuration Profile in Intune.
AppLocker relies on the Application Identity service (AppIDSvc). You must ensure this service is set to start automatically on your managed devices via an Intune PowerShell script or Endpoint Protection profile.
On a reference Windows device, type 'secpol.msc' in the Run dialog to open the Local Security Policy. Navigate to Application Control Policies > AppLocker > Executable Rules. Right-click and choose 'Create Default Rules'. This crucial step ensures that default Windows OS processes and Program Files are allowed to run.
Right-click 'Executable Rules' again and click 'Create New Rule'. On the Action screen, select 'Deny'. On the Conditions screen, select 'Path'. Browse to or manually enter the path you want to block, such as %OSDRIVE%\Users\*\Downloads\*, and complete the wizard.
Right-click the top-level 'AppLocker' folder in the left pane and select 'Export Policy'. Save this configuration as an XML file. Open the XML file with a text editor to verify the default rules and your new deny rules are present.
In the Intune admin center, go to Devices > Windows > Configuration profiles and create a Custom profile. Add an OMA-URI setting with the path './Vendor/MSFT/AppLocker/ApplicationLaunchRestrictions/Grouping/EXE/Policy' and paste the string contents of your XML file into the value field.

Streamline Your IT Documentation with WPS Office
Managing complex Intune policies and drafting AppLocker XML files requires a reliable document editor. WPS Office offers a completely free, lightweight alternative to Microsoft Office, making it perfect for IT professionals managing endpoint security documentation and deployment plans.
- 1. Download WPS Office: Visit the official WPS Office website and download the free installation package for Windows.
- 2. Install on Your IT Workstation: Run the setup file and follow the quick installation prompts to deploy the suite on your management device.
- 3. Edit Policies and Plans: Open WPS Writer to draft your deployment guidelines or use it to edit XML files before uploading them to the Intune portal.

Frequently Asked Questions
Why can't Intune block executable files without using AppLocker?
Intune is a device configuration management platform. The actual enforcement of file execution restrictions must happen at the operating system level, which is natively handled by Windows AppLocker or Windows Defender Application Control (WDAC).
What happens if I forget to create default rules in AppLocker?
If you deploy an AppLocker policy without default rules, Windows will assume a 'deny all' stance. This will block core operating system files and critical drivers from running, rendering the device unusable.
Is it better to block EXE files by path or by publisher?
Blocking by publisher is generally more secure because it relies on the digital signature of the application. However, if you specifically want to neutralize a directory like the Downloads folder where users save random files, a path-based deny rule is the standard approach.
How do I troubleshoot if legitimate applications are blocked by this policy?
You can check the Windows Event Viewer on the affected device under Applications and Services Logs > Microsoft > Windows > AppLocker > EXE and DLL. Look for Event ID 8004 to identify exactly which file and rule caused the block.




