Subject: bug#18745: 24.3; MS Windows, `call-process-shell-command' fails on `shell-quote-argument'ed bat file with quoted args

From: Stefan Monnier <[email-masked]>
Date: Thu, 16 Oct 2014 20:38:38 -0400

>> - The "rest" arguments to call-process-shell-command are deprecated.
> I was unaware of that, is it written anywhere?

It's new in 24.4 (it was actually an oversight: this calling convention
was deprecated for start-process-shell-command in 24.1 IIRC, but for
some reason I didn't notice that it was also used in
call-process-shell-command).

>> - Why not use call-process instead (since you don't actually use the
>> "shell-command" part, really)?
> That would probably make more sense, but it turns out not to help anyway:

I kind of guessed it.  I remember reports that starting commands with
a space in its name is pretty much impossible.  In the case that the
space is in the directory name, I heard you might work around that by
adding the directory to exec-path:

   (let ((exec-path (cons "c:/path with space/" exec-path)))
     (call-process "foo-bar.bat" nil t t "x" "y")

This is all hearsay, tho, because luckily I never need to use
a Windows system.

        Stefan