Choco: RefreshEnv.cmd and WM_SETTINGCHANGE

Created on 5 Jun 2018  路  4Comments  路  Source: chocolatey/choco

Hello,

RefreshEnv.cmd has been a godsend! Thank you!

This works well in a currently open command window.

However, I've learned that the WM_SETTINGCHANGE signal needs to be broadcasted to the system for the Path change to take effect for all command windows .

Anecdotally, I've found I've had to close all command windows and reopen a new one for the Path change to take effect. (Because... Windows).

Recommending that you broadcast WM_SETTINGCHANGE when you set the PATH. As an idea, keeping the broadcast message in a different script might help with reusability and maintain separation-of-duties.

Invalid / Not Issue / No repro / Not Implementing

All 4 comments

WM_SETTINGCHANGE has no effect on command windows, only UIs that choose to pay attention.

This is why refreshenv is required to be run in every command shell, so they update as well.

Heck, this is why refreshenv exists in the first place 馃憤

Was this page helpful?
0 / 5 - 0 ratings