how to programming change group policy?



Hi, everyone, I'm writing an program which change the group policy, example,
I modify the registry

StartMenuLogOff(DWORD) = 1

and Use

SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, Integer(PChar('Polices')), 0);

to Refresh system , It take effect immedialtely! But when I open gpedit.msc,
It still display as "Not configration".
I search for registry, and found a location about this:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Group Policy
StartMenuLogOff(DWORD) = 1

if you change the value under the key sync, gpedit.msc will accept our
modify! But the GUID will change every time when you run gpedit.msc and
diffrent for every PC! So i check the system direcotry, and I found the
file %system%wbem\Repository\FS\OBJECTS.DATA also store the policies! But I
don't know how to Update the WBEM(WMI) sync, Can anybody help me? Thank in

Best regards.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question