This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Set Environment path variable SendMessage hangs on Win10
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jan 13, 2016
08:34 AM
Set Environment path variable SendMessage hangs on Win10
Hello,
on a Windows 10 depends SendMessage after setting the PATH variable. After 15 minutes the setup continues. On a Windows 8.1 there are no problems.
I do this:
With SendMessageTimeout there is no error. I change my code to:
Is there an explanation for why SendMessage Windows 10 takes so long?
Best Regards,
urbarobe
on a Windows 10 depends SendMessage after setting the PATH variable. After 15 minutes the setup continues. On a Windows 8.1 there are no problems.
I do this:
#define HWND_BROADCAST 0xffff
#define WM_WININICHANGE 0x001A
szEnv = "Environment";
pEnv = &szEnv;
SendMessage(HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
With SendMessageTimeout there is no error. I change my code to:
#define WM_SETTINGCHANGE 0x001A
#define SMTO_ABORTIFHUNG 0x0002
#define SMTO_TIMEOUT 50
if (!SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, pEnv, SMTO_ABORTIFHUNG, SMTO_TIMEOUT, pResult)) then
SprintfBox(WARNING, "", "SendMessageTimeout failed in RefreshEnvironment, Error %d", Err.LastDllError());
endif;
Is there an explanation for why SendMessage Windows 10 takes so long?
Best Regards,
urbarobe
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Jun 08, 2016
04:26 AM
We are seeing a similar issue with Windows 7 -64 bit itself, where
SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
is taking more time. I read similar posts suggesting to use SendMessageTimeout,
I see there is some restart required after environmental variables being set and so SendMessage is taking more time.
Is my understanding correct?
Also by using SendMessageTimeout will the problem of taking more time to refresh env will get solved?
Please do reply back.
Thanks,
Priya
SendMessage (HWND_BROADCAST, WM_WININICHANGE, 0, pEnv );
is taking more time. I read similar posts suggesting to use SendMessageTimeout,
I see there is some restart required after environmental variables being set and so SendMessage is taking more time.
Is my understanding correct?
Also by using SendMessageTimeout will the problem of taking more time to refresh env will get solved?
Please do reply back.
Thanks,
Priya
![](/skins/images/A5EADE085F77DE82FB3B14D6B307AE6A/responsive_peak/images/icon_anonymous_message.png)