Replace JScript by loading JScript9Legacy in place of JScript.
Remplacez JScript en chargeant JScript9Legacy à la place de JScript.
Explanation
This policy setting specifies whether JScript or JScript9Legacy is loaded.
If you enable this policy setting or not configured, JScript9Legacy will be loaded in situations where JScript is instantiated.
If you disable this policy, then JScript will be utilized.
Ce paramètre de stratégie spécifie si JScript ou JScript9Legacy est chargé.
Si vous activez ce paramètre de stratégie ou s'il n'est pas configuré, JScript9Legacy sera chargé dans les situations où JScript est instancié.
Si vous désactivez cette stratégie, JScript est utilisé.
Registry
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Internet Explorer\MainHKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main- Value name
JScriptReplacement
| State | Value written |
|---|---|
| Enabled | REG_DWORD = 1 |
| Disabled | REG_DWORD = 0 |
PowerShell
PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.
Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.
Computer (HKLM)
Enable
# Enable: inetres/JScriptReplacement
$k = 'HKLM:\Software\Policies\Microsoft\Internet Explorer\Main'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'JScriptReplacement' -Value 1 -Type DWordDisable
# Disable: inetres/JScriptReplacement
$k = 'HKLM:\Software\Policies\Microsoft\Internet Explorer\Main'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
Set-ItemProperty -Path $k -Name 'JScriptReplacement' -Value 0 -Type DWordRevert to "Not configured"
# Revert to "Not configured": inetres/JScriptReplacement
$k = 'HKLM:\Software\Policies\Microsoft\Internet Explorer\Main'
Remove-ItemProperty -Path $k -Name 'JScriptReplacement' -ErrorAction SilentlyContinueUser (HKCU)
Enable
Disable
Revert to "Not configured"