-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Installer does not notify other apps after updating PATH #2407
Comments
@piscisaureus @igorzi @tjanczuk - any of you know how to do this with WiX? |
Windows installer already does this (broadcasting WM_SETTINGCHANGE message). See http://msdn.microsoft.com/en-us/library/windows/desktop/aa372883(v=vs.85).aspx. Is it possible that you have a pending reboot on your system?
|
Is it possible you had command prompt open before you started the node install? Command prompt only uses the snapshot of environment variables from when it was opened. If I manually modify my PATH variable, I need to open a new instance of command prompt for this change to take place. |
Good thought, but no, I opened a new command prompt after the install.
Not that I was aware of, but I guess it's possible. That's good to know, about it not broadcasting when there's a pending reboot. I won't be at that computer again until next Tuesday, but then I'll try uninstalling, rebooting, and then install and see if it works. |
Ok, closing the issue. Please reopen if you can reproduce after the reboot. |
I installed node-v0.6.6.msi on a Windows machine that had never had node.js installed before. The installer ran, and when it was done, it told me to open a command prompt and type
node
. I did, and the command prompt told me "'node' is not recognized as an internal or external command, operable program or batch file.
"When I looked in Control Panel > System > Advanced > Environment Variables, the PATH had been updated correctly. The installer apparently just didn't notify other running processes (specifically, Explorer) that they needed to reload their environment blocks. Since you use Windows Explorer (via the Start menu) to open the new command prompt, that command prompt inherits Explorer's environment block, and since Explorer's environment block was stale and didn't have the new PATH, I couldn't open a command prompt and run node.
I tried uninstalling node and then reinstalling, and the problem persisted, which seems to rule out any kind of sporadic problem -- it looks like the installer simply isn't sending the necessary change notifications.
This would have fixed itself if I had rebooted, but that's a poor solution. I fixed it manually by making a trivial edit to the PATH environment variable (still in the Environment Variables dialog) and clicking OK, which did notify running processes of the change, so Explorer reloaded its environment block, and then everything was fine. But the installer should be sending the proper notifications automatically so everything works.
I'm not sure what you use to build your installer, but here's some info on the notification that needs to be sent: http://support.microsoft.com/kb/104011
The text was updated successfully, but these errors were encountered: