To clarify further. Environmental variables are not just loaded at login. 1. New instances of cmd prompt in the same windows session will enumerate the new env vars. This is why you are able to close on command prompt and open another in which knife will work. If you are looking for a hacky work around for this type of problem, http://stackoverflow.com/questions/171588/is-there-a-command-to-refresh-environment-variables-from-the-command-prompt-in-w 2. For an even (or maybe less) hackier work around, just set PATH=%PATH%;c:\opscode\bin;c:\opscode\embedded\bin. This will add the ops code directories to you current cmd.exe session. 3. Using the Win32 API it is possible to notify other processes that environmental variables have changed. (See https://github.com/opscode/chef/blob/master/chef/lib/chef/provider/env/windows.rb#L66 for an example). The unfortunate part is that cmd.exe does not subscribe to this event. Paul On Dec 12, 2011, at 5:56 AM, Tensibai wrote:
|
Archive powered by MHonArc 2.6.16.