-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Installer does not broadcast a WM_SETTINGCHANGE #603
Comments
I have heard other people say the same but I've never been able to reproduce the issue.
I am not sure this is true. I don't think it has any effect on the scenario where the command window is re-opened after installation. Also, cmd.exe does not listen for WM_SETTINGCHANGE. The installer source code is here: https://github.com/iojs/io.js/blob/v1.x/tools/msvs/msi/product.wxs |
I'm on Windows 8.1 x64 and if I run the cmd after installation as administrator the PATH is updated correct, but not in a non-administrator cmd (Maybe you have UAC disabled?) And I wrote a small console application that broadcasts the |
I'm using windows 8.1 too; whether I run elevated or non-elevated cmd.exe doesn't seem to matter here. (Slightly OT, I believe that in Windows 8.1 it's not really possible to turn UAC off. The only option you have is to not show the UAC popup).
I'll take your word for it. Is it possible to modify the installer so it broadcasts this message? |
See also nodejs/node-v0.x-archive#2407 |
Ok, if I reboot and run the MSI it works as expected, but if I uninstall and then install io.js again then the same behavior occurs. So in my case I removed node.js before I installed io.js and the node.js MSI set something like a "restart pending" flag and io.js MSI did not broadcast... But none of the installers say that a reboot IS necessary! The usual restart pending registry keys that I know are I think if a reboot is not necessary then the MSI should not behave like this. But overall this is a rare case. Thanks @piscisaureus for your fast response! |
I referenced a fix. Now the installer always sends a |
Wow, that's crazy... We could merge this and try it out in nightlies before committing to a release with this. If you don't get a quick -1 here @mathiask88 then you should PR this. |
@rvagg indeed, however it would be nice if someone could reproduce this. |
My suggestion would be to land that patch asap and ship it as part of a release to see if there is any fallout. |
That may be because we didn't define a dialog in which this shown. |
@piscisaureus Yes, this was a quick fix and I did not look into your code styles yet. I am not a professional , but I will do my best and try to match your styles and open a PR.
I ran the io.js MSI in verbose mode and the logfile did not contain any |
In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs#603 PR: nodejs#613 Reviewed-by: Bert Belder <[email protected]>
Backport 668bde8 from io.js. Original commit message follows: In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs/node#603 PR: nodejs/node#613 Reviewed-by: Bert Belder <[email protected]> (cherry picked from commit 668bde8) --Node.js commmit metadata-- PR-URL: #25100 Reviewed-By: Julien Gilli <[email protected]> Fixes: #4356
Backport 668bde8 from io.js. Original commit message follows: In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs/node#603 PR: nodejs/node#613 Reviewed-by: Bert Belder <[email protected]> (cherry picked from commit 668bde8) --Node.js commmit metadata-- PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <[email protected]> Fixes: nodejs#4356
Backport 668bde8 from io.js. Original commit message follows: In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs/node#603 PR: nodejs/node#613 Reviewed-by: Bert Belder <[email protected]> (cherry picked from commit 668bde8) --Node.js commmit metadata-- PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <[email protected]> Fixes: nodejs#4356
Backport 668bde8 from io.js. Original commit message follows: In theory the msi should broadcast a 'WM_SETTINGCHANGE' message to all windows after modifying the PATH environment variable. This ensures that the new PATH is visible to other processes without restarting windows (although it's still necessary to close and reopen active console windows). Unfortunately, the broadcast doesn't always happen, for unknown reasons. That's why this patch adds a custom action that unconditionally broadcasts a WM_SETTINGCHANGE message. Bug: nodejs/node#603 PR: nodejs/node#613 Reviewed-by: Bert Belder <[email protected]> (cherry picked from commit 668bde8) --Node.js commmit metadata-- PR-URL: nodejs#25100 Reviewed-By: Julien Gilli <[email protected]> Fixes: nodejs#4356
Hi,
if I install io.js with the MSI the PATH changes do not take effect until restart/logout-login. This can be fixed if the MSI broadcasts a
WM_SETTINGCHANGE
message withlParam
set toEnvironment
. Anyone else with this problem? Maybe my windows is just broken :)The text was updated successfully, but these errors were encountered: