0

I have been scratching my head over the following issue:

After installing a package via chocolatey (in my case, gnuplot) - I am notified that the environment variables has been modified.

I am able to call it in Powershell simply by typing gnuplot so I was expecting to see the value of gnuplot by typing Get-ChildItem Env:gnuplot but it claims that it doesn't exist...

Where can I see the "values" of these packages? (the path to the exe in a sense)

trexgris
  • 362
  • 3
  • 14
  • The search path used by `CreateProcessW` consists of the application directory, the current directory (can be disabled), the "System32" directory, the legacy "System" directory, the Windows directory; and the directories listed in the `PATH` environment variable. In a fresh environment, the latter variable is loaded as a union of the system and user values in the registry. – Eryk Sun Oct 11 '19 at 14:19
  • 1
    That said, I think, like CMD, PowerShell implements its own `PATH` search instead of relying on `CreateProcessW`, in order to support the `PATHEXT` environment variable. Note that if you use `start` in CMD or `start-process` in PowerShell, the shell will try `ShellExecuteExW` even if its internal search fails to find the command in `PATH`. This supports registered application paths in subkeys of "[HKCU|HKLM]\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths". – Eryk Sun Oct 11 '19 at 14:27

1 Answers1

0

What chocolatey is most probably telling you, that environment variables have been updated (i.e. PATH-Variable) and that those changes have been "refreshed" in the current environment. Depending on the install scripts inside the gnuplot package, there might even not have been any changes. Anyways, gnuplot executable seems to be in your PATH (since you can call it from powershell).

Just use Get-Command gnuplot in Powershell to find the path.

Malte
  • 301
  • 2
  • 3