PR

Windows11の24H2にしたらJScriptが動かない

記事内に広告が含まれています。

備忘録

最近こういう目によく会う気が・・・?

今まで動いていた、とある製品のインストーラが原因不明のエラーを返すようになって、インストール不能に陥りました

エラー画面をよく見ると .wsf ファイルの実行で

Windows Script Host: エラーを特定できません

と表示される

散々ググってみると(めちゃハマった。セキュリティ系ソフトにブロックされているんじゃないかと仮説を立ててしまったので遠回りに・・・ orz)、どうやら、Windows11 24H2 でJavascript周りの仕様変更?があったらしく、それを従来のものに戻すレジストリ値とグループポリシーが追加されており、それを設定することで回避できました

レジストリ値

レジストリ値の変更はシステムに重大な影響を及ぼす場合がありますので、理解した上での実行、かつ自己責任でお願いします

HKEY_CURRENT_USER\Software\Policies\Microsoft\Internet Explorer\Main
ここに、JScriptReplacementというDWORD(32ビット)値を作成し、数値は0にします。

参考リンク

24H2にしたら落ちる? - 秀丸ファイラーClassicβ版 - スレッド11355, 2024/10/23

これを設定することによる副作用はまだ見つかってはいませんが、無いとは言い切れないのでご注意を・・・

グループポリシー

https://www.microsoft.com/en-us/download/details.aspx?id=106255

24H2 inetres.admx Replace JScript by loading JScript9Legacy in place of JScript. Machine Windows Components\Internet Explorer HKLM\Software\Policies\Microsoft\Internet Explorer\Main!JScriptReplacement At least Internet Explorer 11.0 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.

Policy Setting NameReplace JScript by loading JScript9Legacy in place of JScript.
Registry InformationHKLM\Software\Policies\Microsoft\Internet Explorer\Main!JScriptReplacement
Help TextThis 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.

コメント

タイトルとURLをコピーしました