Most GPO settings are either enforced/user can't change the setting/ or applied only one time /software install/. My question is - if I set a specific registry key using a GPO and the registry key is changed, will the GPO overwrite the registry key with the one set in GPO? We run a specific software, which sets several registry keys in HKLM\Software. We never had any troubles with computers running Windows7, Vista or etc. The problem is that Windows10 for some reason deletes one of these keys every time when it updates. I am asking specifically about registry settings, applied to computers in Active Directory via GPO. Because if the Computer GPO will not override the settings on reboot after they are deleted by Windows10, I would be forced to deploy startup script instead, which will use REG QUERY to check if the key exists and then if it exists - REG DELETE and REG ADD. And if the key does not exist at all - REG ADD to add the key. I want to protect specific registry settings, which Windows10 continues to delete on every update.
1 Answer
Is the program changing the registry or is your startup script? It is best to use group policy instead of startup scripts. You will enjoy more reliability, consistency, and security.
Anyways, on to your question. Yes, GPOs refresh every 90 minutes, on reboot, and upon receiving a gpupdate /force. Refresh means that the GPO "runs" completing all of the items in the object. For example, let's say you have a key that removes the sign out button in the start menu. Normally when you login you can assume that the sign out button will not appear, but what if you manually added the button using regedit? Would the button reappear next time the computer reboots? It depends on how the GPO is configured. When you add a new 'Registry Item' you have to select one of four actions: Create, Replace, Update, and Delete. If you want to learn more about these here is a good article. For brevity, I will say you would most likely want to use 'Replace' as it will replace the key with whatever was in the GPO and will create it if it doesn't exist.
Note that GPOs are refreshed but do not necessarily take effect immediately. Certain GPOs require a restart, logout/login, or closing and reopening a program.