How to Disable Open File Security Warnings on Windows by File Type
September 30, 2020

Introduction

As a web developer, you often set your JavaScript files to open with a text editor instead of being executed. As a result, such files open for code reading and editing do not pose any security threat.

However, the operating system still thinks that JavaScript files are run when double clicked and tries to protect you from any malicious code that might run when the file is open.

You can disable this warning for each and every file you open (check the example screenshot below) but that quickly becomes tedious.

The policy we will edit allows you to configure the list of low-risk file types known to Windows. If the attachment is in the list of low-risk file types, Windows will not prompt you before accessing the file, regardless of the file's zone information.

Solution Steps

Open your Group Policy by pressing Windows Key + R on your keyboard and then entering gpedit.msc and pressing enter.

In the left pane navigate to User Configuration, Administrative Templates, Windows Components, Attachment Manager. 

Double click on the "Inclusion list for low file types" policy and select Enabled and paste the following line in the Specify low-risk extensions input field: .js and click ok.

This change works immediately on Windows 10 Pro version 2004. You might need to restart if you have an earlier version of Windows. Unfortunately, this looks like it is only available on Pro and Enterprise versions of Windows.

Example Open File Security Warning

Example Open File Security Warning


Windows Development

Share this post


Written by
Mario Awad

Founder of SOFTKUBE, lead developer, and getting things done addict. Passionate about open source, user interface design, business development, and the tech world.

More about Mario Awad


About
SOFTKUBE

A small team of experts developing simple, usable, and high-quality web solutions. We blog about business, entrepreneurship, web development, and technology.

More about us


Recent Posts

Finding and Fixing Unintended Body Overflow to Remove Horizontal Scrollbars

Responsive Logo Design Overview

How to Disable Open File Security Warnings on Windows by File Type

Quick Reference on the Number of Keys on a Standard Keyboard Layout

View all posts


All Posts Categories

Business Cheat Sheets CLI Design Development Downloads Drupal Email Google Apps HID Keyboards Multilingualism Open Source Philosophy PHP Pointing Devices Productivity Quotes Science Security SEO Technology Thoughts Windows Zend Framework