Fix support for Windows Batch

Merged Kamil Trzcińśki requested to merge fix-cmd-shell into master