Archive: Flush the Registry


Flush the Registry
Currently, I am writing an environment variable, but it does not get "set" until I either reboot, or open the Environment Variable dialog and hit OK. I believe that there is a Flush method in available in the WinAPI. Would it be possible to create a way for NSIS to call Flush?

Sixty4Bit


Check MSDN. I guess you can find the thing you want to do there. Just build it into a DLL or maybe even a vbs script and call or execute the thing respetively.

-Hendri.


Please have a look here:
http://forums.winamp.com/showthread....highlight=path


Do you have the source code to RefreshEnv.exe? If so, would you mind posting that as well. Thanks,

Sixty4Bit


There isn't much more there but the line I have already posted. The only other code lines are WinMain decleration and return :D


I ask because, I searched MSDN for about 4 hours last night looking for an example or something. I FINALLY found an example in an IISSamples object (of all places). I installed it, gave it a try and it didn't work. The code looked right, but it didn't work. I just wanted to see how you did it. If you don't want to share with everyone else, would you PLEASE share with me? :) Email me at me@sixty4bit.com

Sixty4Bit


It is there... Look closer at the post I have sent you.


Thanks. Helps when one reads the entire thread. :D