Platform SDK Shell >> How to refresh explorer/group policy immediately(don't restart windows)?

by John » Thu, 20 Jan 2005 15:17:55 GMT

Hi, everybody!
When we use gpedit.msc to change some settings, Windows can take effect
immediately, needn't restart computer or windows.
as we know, gpedit.msc also modify the registry, example:
If we want hide RUN from the start menu, we can modify registry:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer,
NoRun = 1 or 0
How to programmer to do this?
I searched and found command line tool gpupdate.exe, but when i modify the
registry and execute gpupdate /force, Nothing happened! I also use
RefreshPolicy function (in userenv.dll) but no effect? how to do it like
gpedit.msc?

thanks in advance.