opscode/chef — comment on commit 2efbafeae9ec09a7f7f8c77009bd6994d7706b03
File: chef/lib/chef/shell_out/windows.rb line 158
By jkeiser:

I understand it now. You're talking about running a program with no quotes in the name at all. This appears to be an area where Ruby is inconsistent with the shell.

C:\Users\John Keiser>C:\a b\c.cmd
'C:\a' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\John Keiser\Documents\win\lib\win>ruby -e 'system("c:\\a b\\c.cmd")'
true

(c.cmd does @echo true)

We should be consistent with Ruby rather than the shell, I think, though I'm actually not a fan of Ruby's special-casing behavior here. For a workaround for you, you can add quotes in your string, like "\"C:\a b\c.cmd\"".

Thanks tons for the report :)