How to Fix Script Error bug in Windows 11 22H2

Description and ways to solve “An error has occurred in the script on this page bug” in Windows 11 version 22H2.

Script Error bug in Windows 11 22H2

Some Windows 11 version 22H2 administrator users have found a bug in causing script error when creating a scheduled task in Group Policy Management Editor. Microsoft hasn’t acknowledged or addressed this awful GPMC issue up to now. This error most possibly occurs because a DLL with a broken script is used in the preferences of Scheduled Tasks. We will try to discuss this Script Error bug in Windows 11 22H2 with potential solutions.

It is not clear whether the error started after the 08/11/2022 patch Tuesday update. You might be knowing an administrator can use the Group Policy Management Editor to set up administrative tasks via Computer Configuration => Preferences => Control Panel Settings branch. From here, users and groups, view services, and several things can be managed. A German blog Borns IT has covered this bug. People are waiting for an official solution to this script error problem on Windows 11.

Script Error bug Windows 11 22H2 – An error has occurred in the script on this page

Here is all about Script Error bug Windows 11 22H2 –

Because of the issue, as soon as you attempt to create a scheduled task in the Group Policy Management Editor through “Scheduled Tasks” an error message will prompt. The statement on this popup is “An error has occurred in the script on this page” coming out of the file C:\\Windows]System32\gppref.dll. The resource is IDR_POLICY_ViEW.htm.

Additionally, the error message shows – An invalid character in line 292 of the called script.

As a result, the task in question cannot then be created or modified through Group Policy Preferences (GPP). See another issue – How to Fix Task Manager Visibility bug (Error) in Windows 11 22H2.

To be more precise, when you click on Scheduled Tasks in the preferences, the error message will appear immediately. This error happens when using any of the preferences.

The error appears on all builds of Windows 11 22H2.

The same report on Spiceworks forum titled “Error is GPMC when trying to edit registry” confirms this problem. In this thread, An admin user explains the error in GPMC under the Active Directory or GPO category.

The administrator asks, Getting “an error has occurred in the script on this page” when trying to edit registry on GPMC. Anyone got any ideas?

The statement on the screenshot is just same –

Script Error
An error has occurred in the script on this page.
Line: 292
Char: 40
Error: Invalid character
Code: 0
URL: res://C:\WINDOWS\System32\gppref.dll/IDR_POLICY_VIEW.htm
Do you want to continue running scripts on this page?
Yes No

Someone extracted the HTML resource from the DLL using a Nirsoft tool and posted it to Pastebin. Line 292 extracted in the Spiceworks thread is similar to:

var el = document.getElementById(`chevron${elId}`)

The script interpreter probably saw an incorrect character there. Ad hoc, I can’t tell if the parameter of getElementById is enclosed with malformed quotes (I suspect so, but am cautious that the corruption isn’t caused by the Spiceworks software), or if there is some malformed character elsewhere.┬áThe thread there also describes that the bug is also included in Windows 11 21H2.

Finally, a bug in the resource that only Microsoft can take care and fix it, however, there is no evidence that can confirm that the company is knowing this error at this time.

Fix Windows 11 22H2 Script Error bug

We have already mentioned that As of now, Microsoft hasn’t taken care of the script Error bug in Windows 11 22H2. As soon as any official or unofficial fix is available we will be the first here to update you –

That’s all!!

Sharing is caring    Share Whatsapp

Topics:  Windows
About Sunita
Love to play with Windows 11 and 10. Suggestion - Going for Registry change or system files edit then remember to take a backup or create a restore point before Starting.