In spite of what I wrote in the comments one can set cmd as shell in ob-sh! The only thing to be aware of is that one needs to use cmdproxy.exe instead of cmd.exe to get the output to stdout right.
You can also do this on a per-code-block basis with the following small advice (working with your version GNU Emacs 25.0.50.1 (x86_64-w64-mingw32)). It defines the new header argument :shcmd for sh-code blocks. There you set the shell you want to use, e.g., cmdproxy.exe
(require 'ob-sh) (defadvice org-babel-sh-evaluate (around set-shell activate) "Add header argument :shcmd that determines the shell to be called." (let* ((org-babel-sh-command (or (cdr (assoc :shcmd params)) org-babel-sh-command))) ad-do-it ))
After installing this advice you can use it as in the following example:
#+BEGIN_SRC sh :shcmd "cmdproxy.exe" dir #+END_SRC #+RESULTS: #+begin_example dir Datenträger in Laufwerk C: ist CRUZER Volumeseriennummer: CEAB-B990 Verzeichnis von c:\temp . .. test.org . . .
(run-shell-command "cmd /c start cmd /k dir")in the past. Perhaps you can tweak that for individual babel blocks.run-shell-commandin(run-shell-command "cmd /c start cmd /k dir")usesshell-file-namewhich is set tobash. This cannot be let-set in a around advice oforg-babel-sh-evaluatebecauseorg-babel--shell-command-on-regionuses(process-file shell-file-name input-file ... shell-command-switch command)withshell-command-switchequal to "-c" andcommandset toorg-babel-sh-command. So the shell is invoked twice. Setting the switches and command to nil does not work (error stringp). One would need a new org-babel language to avoid shob-sh-elto a new languageob-cmd.eland edit it to work with cmd.emacs-versionoutput? Note, a (big) problem is also process-communication withcmd.exeviastdinandstdout.GNU Emacs 25.0.50.1 (x86_64-w64-mingw32) of 2015-09-07on Windows 7. Specifically, this build: sourceforge.net/projects/emacsbinw64/files/snapshot/… (I also have git-bash on%PATH%and in emac'sexec-path)