What is the difference between:

(call-process "cmdproxy"  nil "foo" nil "/c"  "dir")
(call-process "cmd"  nil "foo" nil "/c"  "dir")


I seem to get exactly the same results in Emacs 25.1 on Windows 10, except cmdproxy works with the -c switch too.


Probably not everyone knows that Microsoft (Windows) has nothing to do with cmdproxy.exe. It is a binary part of Emacs distribution (i.e. made by Emacs developers) in order to call Windows subprocesses. As noted above, I don't see any sensible benefit over cmd.exe.
Hence this question belongs here, not Windows forums.

  • 1
    You should ask about the difference between cmdproxy and cmd in a Windows forum.
    – NickD
    Jun 7, 2018 at 12:24
  • 1
    @Nick: please, see the update
    – antonio
    Jun 7, 2018 at 14:27

1 Answer 1


I just found this:

Proxy shell designed for use with Emacs on Windows 95 and NT. [...] The main function is simply to process the "-c string" option in the way /bin/sh does, since the standard Windows command shells use the convention that everything after "/c" (the Windows equivalent of "-c") is the input string.

Personally, I don't see cases where you are obliged to pass the shell command "-c string". You can always write

(format "%sc string" 
    (if (eq system-type 'windows-nt) "/" "-"))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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