'Set 'Local Group Policy Editor' settings from code
Some things are set through the Local Group Policy Editor
.
Is there a way to set them in code? If not, is there a way through the command line (and therefore I can call that from code)?
Solution 1:[1]
The only thing Local Group Policy Editor
does is this: it pushes/creates registry keys. So what you actually want to do is create registry keys with your code (there is a API to do that).
First go to your Local Group Policy Editor make the change you want (manually) then refresh or open your Registry editor. After that click control + f
(in Registry) to search for certain keys. Try to find the keys your LGPE created or changed in the Registry.
If you found the edited or created keys the rest is easy, you just have to make the same registry changes with your code.
Edit: I think there is some software that tracks the registry for changes. You can Google it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |