logo
search
Security Policy Errors

How to Fix Unsafe Location Warnings for CMD Links in Microsoft Office

Maira MehtabMaira Mehtab Sep 24, 2026 870 views

Question details

Users are seeking a way to stop Microsoft Office from displaying security warnings when clicking hyperlinks that launch CMD files, as adding the folder to Trusted Locations does not resolve the issue.

Product
Microsoft Office
Device & OS
not provided
Scenario
Clicking a hyperlink within an Office document that is linked to a local .cmd executable file.
Observed behavior
Office triggers one or more "Unsafe Location" security warnings before opening the CMD file, even if the file and document are stored in a designated Office Trusted Location.
Before you start

Ensure that any CMD files you intend to execute are from a verified and fully trusted source, as command scripts can pose severe security risks to your system if they contain malicious code.

Solution 1Recommended

Submit Feedback on Trusted Location Limitations

Since Office Trusted Locations are primarily designed for VBA and internal Office content, bypassing warnings for external command files is restricted by default. The official recommendation is to submit feedback to Microsoft.

Microsoft intentionally restricts executable files (like .cmd or .bat) from bypassing security warnings, regardless of trusted location settings. Because changing this core security behavior requires a Microsoft update, submitting targeted feedback is the official route to address redundant warnings.

1
Open the Help Menu

Launch Microsoft Word (or the affected Office application) and navigate to the 'Help' tab on the top ribbon.

2
Access the Feedback Tool

Click the 'Feedback' button. Alternatively, you can visit the Microsoft Feedback portal online.

3
Detail the Issue

Provide a clear description of the issue, specifically mentioning if you are receiving two separate warnings for a single CMD link, and request better integration with Trusted Locations.

Security Behavior: Microsoft may be reluctant to change this behavior due to the inherent risks of executing external command files.
Free Microsoft Office alternative

Try WPS Office for a Seamless and Secure Document Experience

If you are frustrated by inflexible security warnings and overly complex Trusted Location settings in Microsoft Office, consider switching to WPS Office. It provides a lightweight, highly compatible alternative with straightforward, user-friendly security controls.

  1. 1. Download and Install: Visit the official WPS website and download the free WPS Office suite for your operating system.
  2. 2. Open Your Office Documents: Launch WPS Office and open your existing Word, Excel, or PowerPoint files directly without losing formatting.
  3. 3. Manage Security Settings: Access the intuitive settings menu to easily configure your trusted files and security preferences.
Fully compatible with Microsoft Word, Excel, and PowerPoint formats (.docx, .xlsx, .pptx)Clear, easy-to-manage document security and trusted path settingsLightweight installation with a familiar, tabbed user interfaceFree to use with comprehensive built-in tools for editing Office documents and PDFs
microsoft office alternative - wps office

Frequently Asked Questions

Why do trusted locations not suppress warnings for CMD files?

Office Trusted Locations are primarily designed to trust macros (VBA) and internal Office content. They do not automatically bypass Windows security protocols for external executable scripts like .cmd or .bat due to the high risk of malicious code execution.

Why do I get two separate security warnings when clicking a CMD link?

This often occurs because both Microsoft Office's internal security center and the Windows operating system independently flag the executable file as a potential security risk, resulting in redundant prompts.

Is it safe to disable hyperlink security warnings in Office?

Disabling these warnings globally (such as via Windows Registry edits) lowers your overall system security and can expose your computer to malware. It is only recommended in strictly controlled IT environments where all files are verified.

Can I bypass the CMD warning by using a different file type?

Converting the CMD commands into an authorized VBA macro within the Office document is typically the safest and most reliable way to execute commands without triggering external hyperlink warnings, provided the document is stored in a Trusted Location.