Applying registry changes without restarting explorer!

You make some changes to windows registry but can’t see the effect on explorer? Well you’ve got to do some more housekeeping to get going, broadcast a setting changed message to all windows to let them know and to get explorer refreshed…

[sourcecode language=’cpp’]DWORD dwResult = 0;
SendMessageTimeout( HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0, SMTO_ABORTIFHUNG, 100, &dwResult );[/sourcecode]

Lookup SystemParametersInfo to see if it’s already being done what you were trying to do!

5 thoughts on “Applying registry changes without restarting explorer!

  1. I’m interested with this part of code.
    Currently I’m building an application with VB 2005, and I guess your code is written in C.
    Can you please pot a full code, and it will be better if it’s converted to VB.
    Thanks in advance.

  2. Thanks for your fast response, even I’m gonna have to wait :).
    Right now I can only manage to restarting the explorer through code to apply the registry change, and it’s not what I’m really expected in my application, cause it had other effects. And in some computer with a slow processor speed it cost more than 3 seconds until the explorer is running again.

  3. You don’t have to.
    You could just post the other part of the code, if you don’t mind.
    Correct me if I’m wrong, that the above code is a part of the other codes (API maybe),
    since I couldn’t figure out what the parameters stands for, or the value they represents.

    (please ignore this post if it’s double post, suddenly I was disconnected !!)

Appreciate your comments...