Refresh system after Set Envrionment
Posted: Tue May 07, 2013 6:45 am
When using "Set Environment" IA does not refresh the system so that new processes can see the modifications my installer has done. A logoff/login or reboot is required which is not acceptable in my current scenario.
What I want to accomplish is that the env.variable I have set/created is available to new processes. For example in a new command prompt I open after my installer is finished, or a new process I launch from IA/Run Program (I know most running processes will not handle the message and refresh, that's OK)
This behavior is discussed in:
viewtopic.php?f=2&t=2754
viewtopic.php?f=2&t=7687
When I used NSIS I used the SendMessage API like this and it worked just fine:
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
In IA I have tried (like others on this forum) a lot of combinations to produce the same result but nothing works.
Here's my last attempt:
~InstallAware Clipboard Data~
~Call DLL Function~
~{0ACA9C70-6665-4180-9494-B34BB8A522FD}~
~user32.dll,SendMessageA,void,,"double word",65535,"double word",26,"double word",0,"allocated string buffer (MAX_PATH length)",Environment,$~
~mIDEFunc.dll\mEXEFunc.dll~
What are we doing wrong?
What I want to accomplish is that the env.variable I have set/created is available to new processes. For example in a new command prompt I open after my installer is finished, or a new process I launch from IA/Run Program (I know most running processes will not handle the message and refresh, that's OK)
This behavior is discussed in:
viewtopic.php?f=2&t=2754
viewtopic.php?f=2&t=7687
When I used NSIS I used the SendMessage API like this and it worked just fine:
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
In IA I have tried (like others on this forum) a lot of combinations to produce the same result but nothing works.
Here's my last attempt:
~InstallAware Clipboard Data~
~Call DLL Function~
~{0ACA9C70-6665-4180-9494-B34BB8A522FD}~
~user32.dll,SendMessageA,void,,"double word",65535,"double word",26,"double word",0,"allocated string buffer (MAX_PATH length)",Environment,$~
~mIDEFunc.dll\mEXEFunc.dll~
What are we doing wrong?