en-US security-baseline computer

Restrict legacy JScript execution for Office

Verified with Microsoft Security Baseline (MSS / SecGuide) 25H2 — updated on July 12, 2026

Supported on: At least Windows Server 2016, Windows 10 Version 1803

Path in the GPO console

Computer Configuration\Administrative Templates\MS Security Guide

Description

This policy setting controls JScript execution per Security Zone within Internet Explorer and WebBrowser Control (WebOC) for Office applications. It's important to determine whether legacy JScript is being used to provide business-critical functionality before you enable this setting. If Enabled, Office applications will not execute legacy JScript for the Internet or Restricted Sites zones and users aren’t notified by the application that legacy JScript execution is restricted. Modern JScript9 will continue to function for all zones. If Disabled or Not Configured JScript will function without any restrictions. The values are set in hexadecimal and should be converted prior to changing the setting value. To learn more about Internet Explorer Feature Control Key and the Restrict JScript process-level policy for Windows, please refer to: https://docs.microsoft.com/en-us/previous-versions/windows/internet-explorer/ie-developer/general-info/ee330734(v=vs.85)#restrict-jscript-at-a-process-level

Registry

HKLM software\policies\microsoft\internet explorer\main\featurecontrol\FEATURE_RESTRICT_LEGACY_JSCRIPT_PER_SECURITY_ZONE

More options available

Options

Excel:
excel.exe decimal - range 0-99999 - default: 69632
Publisher:
mspub.exe decimal - range 0-99999 - default: 69632
PowerPoint:
powerpnt.exe decimal - range 0-99999 - default: 69632
OneNote:
onenote.exe decimal - range 0-99999 - default: 69632
Visio:
visio.exe decimal - range 0-99999 - default: 69632
Project:
winproj.exe decimal - range 0-99999 - default: 69632
Word:
winword.exe decimal - range 0-99999 - default: 69632
Outlook:
outlook.exe decimal - range 0-99999 - default: 69632
Access:
msaccess.exe decimal - range 0-99999 - default: 69632

Export Builder

BETA

Configure the state, scope and options, then generate .reg, PowerShell, Intune and SCCM outputs — or add the setting to a multi-setting collection.

These exports write the registry — this is not a managed GPO.

.reg file

Windows Registry Editor Version 5.00

; Exported from gporais.com
; Policy: Restrict legacy JScript execution for Office
; State: Enabled
; Supported on: At least Windows Server 2016, Windows 10 Version 1803

[HKEY_LOCAL_MACHINE\software\policies\microsoft\internet explorer\main\featurecontrol\FEATURE_RESTRICT_LEGACY_JSCRIPT_PER_SECURITY_ZONE]
"excel.exe"=dword:00011000
"mspub.exe"=dword:00011000
"powerpnt.exe"=dword:00011000
"onenote.exe"=dword:00011000
"visio.exe"=dword:00011000
"winproj.exe"=dword:00011000
"winword.exe"=dword:00011000
"outlook.exe"=dword:00011000
"msaccess.exe"=dword:00011000
More formats (PowerShell, Intune, SCCM)

PowerShell

# Exported from gporais.com
# Policy: Restrict legacy JScript execution for Office
# State: Enabled
# Supported on: At least Windows Server 2016, Windows 10 Version 1803

$path = 'HKLM:\software\policies\microsoft\internet explorer\main\featurecontrol\FEATURE_RESTRICT_LEGACY_JSCRIPT_PER_SECURITY_ZONE'
New-Item -Path $path -Force | Out-Null
Set-ItemProperty -Path $path -Name 'excel.exe' -Value 69632 -Type DWord
Set-ItemProperty -Path $path -Name 'mspub.exe' -Value 69632 -Type DWord
Set-ItemProperty -Path $path -Name 'powerpnt.exe' -Value 69632 -Type DWord
Set-ItemProperty -Path $path -Name 'onenote.exe' -Value 69632 -Type DWord
Set-ItemProperty -Path $path -Name 'visio.exe' -Value 69632 -Type DWord
Set-ItemProperty -Path $path -Name 'winproj.exe' -Value 69632 -Type DWord
Set-ItemProperty -Path $path -Name 'winword.exe' -Value 69632 -Type DWord
Set-ItemProperty -Path $path -Name 'outlook.exe' -Value 69632 -Type DWord
Set-ItemProperty -Path $path -Name 'msaccess.exe' -Value 69632 -Type DWord

Building a multi-setting collection? Add this setting and generate combined .reg / PowerShell / GPO scripts.

Open the Builder

Embed this policy on your site

What to embed
Theme

Adds one script line: the theme follows your site’s appearance and the height fits the content. If your site blocks scripts, the embed follows the visitor’s system theme.

Preview