Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is there a Linux methodology to include .exe files symbolically to a location referenced by the %PATH%? The process seems trouble free on Linux, but when attempting to do similar actions via mklink on Windows as opposed to ln -s on Linux I always seem to have issues regarding dependencies located in the original application root directory (like binaries, etc.) Thus I would like to know of a concrete example to add application launchers to a PATH location as to enable me to run them conveniently from the command prompt like launching Firefox via simple firefox command?

share|improve this question
Is there a Windows methodology perhaps? Also one problem may be DLL searh order msdn.microsoft.com/en-us/library/windows/desktop/… since on Windows the shared libraries are often relative to the binary. –  naxa Apr 6 '13 at 11:55

1 Answer 1

up vote 1 down vote accepted

Create a your_link_name.cmd file where you would want to put the link, with the following contents:

start /D c:/path/to/working/directory c:/path/to/working/directory/example.exe %*

%* should pass any arguments given.

If you need to wait until the process finishes you are better off with psexec from sysinternals, now microsoft, see homepage. I remember start+cmd being buggy in this respect.

psexec -w c:/working_dir c:/working_dir/example.exe %*

In arguments, file paths must be absolute paths on the target system.

share|improve this answer
Note: while / works in windows as a path separator, some executables just don't realize this and won't accept it. Also it doesn't always work with UNC paths with some resources. But psexec and start themselves should have no problems with it. –  naxa Apr 6 '13 at 12:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.