I know how to change the path using the advapi32.dll but I cannot get the path to take. If I open the Control Panel\System\Environment I see the change but it is not applied yet. How can I systematically apply the change.

Thanks in advance