Updating path to find program installed with cinst

Ray Tiley's Avatar

Ray Tiley

01 Dec, 2014 08:28 PM

Hopefully this will be my last support request for a bit :) Thanks for all the help.

Using choclaty to install phantomjs which works great. The only problem is I can't seem to get it in the path in such away that our testem test scripts will find it.

If I use SET it returns with an error:

From the output it looks like choclaty adds it to the path, but using a where doesn't seem to find it.

I'm sure I'm just missing something stupid, thanks for the second set of eyes.


  1. Support Staff 1 Posted by Feodor Fitsner on 01 Dec, 2014 11:23 PM

    Feodor Fitsner's Avatar

    Just update PATH explicitly in your build script using

    SET PATH=c:\some_new_path;%PATH%
  2. 2 Posted by gep13 on 02 Dec, 2014 07:14 AM

    gep13's Avatar

    Out of the box, Chocolatey doesn't do any work to reload the PATH variable into the current session. As a result, when you are running Chocolatey in a non-CI environment, the workaround is to close the current window, open it again, and all will be well.

    In a CI environment, that doesn't really fly.

    There is a helper filein Chocolatey, I seem to remember it being called RefreshEnv.bat, that you could look at using, to see if that would help, or, as Feodor has pointed out, manually update the variable.


  3. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 01:50 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac