Microsoft Support:
Applies to
Windows 11 version 24H2, all editions Windows 11 version 25H2, all editions Windows Server 2025
Original release date: June 18, 2026
KB-ID: 5105752
Symptoms
Global JScript definitions and execution contexts loaded from multiple scripts or provided via polyfills may not persist after the individual scripts have finished executing. Therefore, some scripts that worked in earlier versions of Windows may fail in Windows 11 version 24H2 and later.Caused
The jscript9legacy.dll is a Dynamic Link Library (DLL) file used in Windows operating systems, primarily for executing JScript code. This DLL is a newer version that replaces the older jscript9.dll to address various security vulnerabilities and improve security, starting with Windows 11 version 24H2.The older jscript9.dll automatically retains global definitions and context, so functions loaded from multiple scripts remain accessible. In jscript9legacy.dll, the execution context is not retained by default. Functions defined within a script are discarded after execution and are inaccessible to the rest of the script.
Solution
This issue is fixed in Windows updates released on and after February 24, 2026 ( KB5077241 ). However, the feature that fixes the problem is disabled by default . Follow these steps to enable the persistent JScript execution context.Important: This article contains information about modifying the registry. Make sure you back up the registry before you modify it. Make sure you know how to restore the registry if a problem occurs. For more information about backing up, restoring, and modifying the registry, see Backing up and restoring the registry in Windows .
- Run the following command to create the registry key for feature control:
reg add "HKLM\Software\Policies\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_ENABLE_PERSISTENCE" - Create a new DWORD (32-bit) value under this key.
- Configure the value as follows:
- To enable persistence for specific processes only :
Set the value for each target process name to 1. - To enable persistence for all processes :
Add * as a key name and set the value to 1.
- To enable persistence for specific processes only :
Source:




