Archive: SendMessage does not work in my installer


SendMessage does not work in my installer
Hi all,

In my installer, I call another installshield which is to add an environment variable for the current user and it takes effect only when system reboot.
In order to avoide system rebooting, I use function
SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
after the installshield, then I read the environment variable but nothing returned. However the environment variable is set in DOS command shell.

Can anybody help? Thanks in advance.

TMXK


That message only works for Explorer. The installer doesn't update its environment variables block when it gets that message. You'll have to manually read that variable from somewhere or execute your installer again from Explorer.


Thank you very much for your quick replay.