When I run "helloworld.bat" from the command line it works so that's not true, at least not for me. I have an xserver installed which comes with some unix funtionality ( like ls, echo, etc ). It's called Xvision. So on the command line if I type "echo helloworld" I see "helloworld" on the next line.
Can you give me a better test, something that will create a file? | [reply] |
I just tried 'echo' on a few different machines ( I know that at least one did NOT have an xserver installed ) and they all work like I expect. From the command line if you type "echo hi" you will see "hi" on the next line.
It may not be a program but it is still a recognized command on windows, as far as I can tell at least, I may be wrong.
| [reply] |
It'll work from the command line, because the command line can execute more than just programs. DOS has some builtin commands. But we're talking about CreateProcess, which runs programs.
Just like DOS can't execute Perl commands (e.g. print), Perl can't execute DOS commands (e.g. echo). echo is built in cmd.exe and command.com and not a program, so CreateProcess can't run it. However, just like you can run perl to execute Perl commands (perl -le "print 'Hello World'"), you can run cmd to execute DOS commands (cmd /c "echo Hello World").
| [reply] [d/l] [select] |