Archive: SendMessage and string parameters


SendMessage and string parameters
I have a windows message whose lParam is pointer to string. This is a famous WM_SETTINGCHANGE that signals to NT/2000 that environment has changed.

It looks like there is no way to send this message from inside NSIS, is there?

If not for this limitation, we would not need special RefreshEnv program to signal environment update in NT/2000. Instead, we would write:

SendMessage ${HWND_BROADCAST} ${WM_SETTINGCHANGE} 0 "Environment" /TIMEOUT=5000

Unfortunately, this does not work. lParam is always 0 in such a construct.

Ivan


Use:

SendMessage ${HWND_BROADCAST} ${WM_SETTINGCHANGE} 0 "STR:Environment" /TIMEOUT=5000

(added to the docs)