JScript Windows11
Jump to navigation
Jump to search
From Windows 11 release 24H2, Microsoft has replaced the scripting engine of JScript used with the Windows Scripting Host
Instead of the old JScript.DLL, the new JScript9Legacy.DLL will be loaded.
This could cause problems or regressions with existing JavaScript code.
To restore the old engine, create a .REG file with the following content and apply it (just double-click on it on Windows file explorer)
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main]
"JScriptReplacement"=dword:00000000
NB: even if the registry key name contains "Internet Explorer", the behaviour of IE11 has not changed (it always uses JScript9.DLL).
Otherwhise download and apply (double-click on it on Windows file explorer) this .reg file: File:24H2 fix.reg.
List of changes/regressions:
- when passing a javascript object that has a prototype with methods from a core script to a HTML window, typeof of a method could return "object" (previously was "function") (varsList_CAN.html was affected)
- when returning a VARIANT of type VT_I4 from a C function to a core script and passing it back to another C function, it comes back as VT_R8 if >= 0x40000000 or <= -0x40000001 (previously was always VT_I4)
- when returning a VARIANT of type VT_UI8/VT_I8 from a C function to a core script and passing it back to another C function, it comes back as VT_R8 or VT_I4 (depending on its value, see above) (previously was VT_UI8/VT_I8, if not modified)
- CollectGarbage() seems to not work as before (still to be investigated)