Custom ADM Templates don’t apply registry settings…
.. and you receive the following error:
1 |
Windows cannot create registry key <registry key>. (The parameter is incorrect. ) |
Usually preceded by an error indicating the offending registry.pol file
I’ve found, through a bit of digging, that the above error occurs when you use custom ADM templates imported in to the Group Policy which you subsequently remove. There’s a good chance that the ADM template contains an error and this will have created a dodgy registry.pol file.
This error prevents the remaining settings in the registry.pol file from being applied.
How to fix a corrupt registry.pol file:
- Create a backup or take note of ALL changes made under Computer Configuration > Administrative Templates. Do not take just the settings changed by your own custom ADM templates as there are more settings stored in the registry.pol file from elsewhere in the Administrative Templates section.
- Create a backup or take note of ALL changes made under User Configuration > Administrative Templates. Do not take just the settings changed by your custom ADM templates as there are more settings stored in the registry.pol file from elsewhere in the Administrative Templates section.
- Find the offending registry.pol file as indicated by the error message received on client workstations.
This is usually located in:
1\\your.domain\SysVol\your.domain\Policies\[GUID of offending registry.pol]\Machine\ - Rename the registry.pol file to registry.pol.old
- Open up the policy with GPMC or your Group Policy Editor and re-enable all values previously enabled under Administrative Templates
I know it’s a nightmare but it’s the only proper fix that I have come across to date. It’s important that when using and or testing your custom ADM templates you should ensure that all settings that tattoo the registry are set back to “Not configured” prior to removing the custom ADM template and importing the new one. As long as you follow this procedure, you shouldn’t have any problems.