Bug causes script error in Group Policy Preferences (GPP) e.g. for Task Scheduler

Windows[German]Microsoft's developers have implemented a bug in the new Windows 11 version 22H2 (and also in Windows 11 21H2), which will prevent administrators to use Group Policy Preferences (GPP). If you try to set up a scheduled task in the Group Policy Management Editor, you will fail with a script error. This is because a DLL with a broken script is used in the Scheduled Tasks preferences. The error also occurs in the Group Policy Management Console (GPMC).


Advertising

On Windows 11 Professional or Enterprise, an administrator can use the Group Policy Management Editor to perform administrative tasks there. In the Computer Configuration -> Preferences -> Control Panel Settings branch (or the German equivalents), users and groups can be managed, services can be viewed, and much more. The Control Panel functions are available there (see the following screenshot).

The tool uses scriptable interfaces to manage Group Policy or access Control Panel features. The error also occurs with Group Policy Management Console (GPMC).

Issues in Windows 11 22H2

German blog reader Markus K. contacted me last week by mail and pointed out a problem related to the Group Policy Management Editor in Windows 11 22H2 (thanks for that). He wrote:

GPP and W11 22H2

Hello,

because it's just annoying and I don't have a solution for it yet.

Windows 11 22H2 and simply want to create a scheduled task, for example.

I think Microsoft has something to fix.

When trying to create a scheduled task under Windows 11 22H2 in the Group Policy Management Editor (access to Scheduled Tasks) in the screenshot above, the tool throws a script error "An error has occurred in the script on this page", referring to the file:

C:\\Windows]System32\gppref.dll


Advertising

and the ressoure IDR_POLICY_ViEW.htm embedded there. The following screenshot by Markus shows the details – an invalid character in line 292 of the called script is reported.

The task in question cannot then be set or changed, because the Group Policy Preferences (GPP) cannot be accessed. Markus then specified the problem in an addendum:

If you want to create a Scheduled Task and click on Scheduled Tasks in the Preferences, the error message pops up immediately.

This is not only the case for Tasks, but even for all Preferences.

In an addendum Markus writes that all builds of Windows 11 are affected, even if he tests with version 22H2 in his environment (confirmed below).

Another report of the bug

On request Markus sent me a link to the Spiceworks forum – I found it with the appropriate search terms in the meantime. In the thread Error is GPMC when trying to edit registry vrom November 15, 2022 an administrator describes the error in the Group Policy Management Console (GPMC) under the categor Active Directory/GPO.

Getting "an error has occurred in the script on this page" when trying to edit registry on GPMC. Anyone got any ideas?

There the same error dialog as Markus K. is shown as a screenshot. Here the error text:

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 with the script from the DLL and then posted it on pastebin. The code line 292 extracted in the Spiceworks head looks like this:

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

There is probably an erroneous character found by the script interpreter. Ad-hoc, I can't tell if the parameter of getElementById is enclosed with incorrect quotes (I suspect it is, but I am wary if the corruption isn't coming from the spiceworks software), or if there is otherwise an erroneous character there. There thread also describes that the bug is included in Windows 11 21H2 as well.

Anyway, it is a bug in the resource that can only be fixed by Microsoft. So far I don't know if this bug has already been reported to Microsoft (there is a mention within the spiceworks forum). I got yesterday also a feedback, that a German user was facing this error trying to change energy settings. Anyone else from the readership who has stumbled across the bug?

Similar articles:
Windows 11 2022 Update (22H2) released
Windows 11 22H2: List of compatible CPUs updated
Patchday: Windows 11/Server 2022-Updates (November 8, 2022)
Windows 10 20H2-22H2 Preview Update KB5020030 (Nov. 15, 2022)
Windows 11 21H2: Preview-Update KB5019157 (Nov. 15, 2022)
Windows 11 22H2: Preview Update KB5020044 (Nov. 29, 2022)
Windows 11 22H2: Upgrade safeguard blocking for reduced game performance partially lifted
Windows 11 22H2: Connection issues with remote desktop confirmed
Windows 11 22H2: Upgrade block regarding printer settings bug removed
Windows 11 22H2: Game performance issues confirmed by Microsoft
Windows 11 22H2: Microsoft confirms display bug inTask Manager caused by update KB5020044
Windows 11 22H2: Microsoft fix for file copy performance issues is coming


Cookies helps to fund this blog: Cookie settings
Advertising


This entry was posted in issue, Windows and tagged , . Bookmark the permalink.

6 Responses to Bug causes script error in Group Policy Preferences (GPP) e.g. for Task Scheduler

  1. Doddym says:

    Yes, I have same error when trying to edit any GPP

  2. Brendan K. says:

    Yep, this happens to me when editing any values in the Preferences folder in Group Policy. This didn't happen on Windows 10, only Windows 11. Very annoying.

  3. Bryan P. says:

    I can confirm, too.
    This error happens when going into any sub-category of the preferences folder.

  4. Advertising

  5. Christian says:

    Yes, the quotation marks are the cause of the error, and replacing them with regular double quotes (U+0022) fixes it. Afterwards, and presumably until the next sfc or image repair, the GPME works just fine.

    Thanks for pointing this out – it was rather annoying.

    • m k says:

      How did you modify the gppref.dll file to make the changes? Can you explain your progress?

  6. Luke says:

    I can confirm that this is still an issue. Microsoft has still not fixed it yet.

Leave a Reply

Your email address will not be published. Required fields are marked *