Am Fri, 25 Sep 2015 16:30:03 +0000 schrieb Jonathan M Davis <jmdavisp...@gmx.com>:
> On Friday, 25 September 2015 at 16:06:44 UTC, Kagamin wrote: > > I suppose, PATH variable on windows works the same as on unix? > > And path hell can be easily reproduced on unix too. Nothing > > windows-specific here. > > AFAIK, PATH on Windows works basically the same as it does on > *nix, but a big difference is that on *nix, there are generally > some very specific places where programs go, and almost nothing > needs to touch PATH - e.g. a binary is usually going to be in > /bin, /usr/bin, or /usr/local/bin, all of which are likely to be > in your PATH variable. And if you installed something as your > user, then you'd generally put the binary (or a symlink to it) in > ~/bin. Windows really doesn't have anything like bin. Everything > gets installed in its own directory (usually under Program > Files), and if you want it to be usable on the command line, you > have to add it to PATH. And since all of these programs are > separate, they can have executables with the same name (e.g. > link.exe), whereas that's much less likely on *nix, because > almost all executables get installed to one of a few bin > directories. So, you won't even end up installing conflicting > binaries, because they'd overwrite each other. > > I really don't know what the "correct" way to deal with this is > in Windows, but the way that it's set up does seem to naturally > cause more problems with PATH than you typically get in *nix. > > - Jonathan M Davis IIRC the windows way is not using PATH if possible. Instead you can usually check if a program is installed and where using some registry keys.