The modifications to the environment variables do not result in an immediate
change. The list of environment variables is loaded when the process is initialized
but not refreshed. To have the newly created environment variable, you can have a
custom action that forces a refresh of the environment variables. You need to
broadcast a settings change message to all windows in the system so that any
interested application can perform an update.
To solve the issue create a custom action that contains the code below which
forces the operating system to refresh the environment variables.
SendMessage (HWND_BROADCAST, WM_SETTINGCHANGE, 0,
(LPARAM)"Environment")