in reply to Re^8: Win32::Process - need help from an expert!
in thread Win32::Process - need help from an expert!

I see what you mean. This is why I put the command into a bat file. Can perl not execute a bat file? I'll try using cmd.exe /c "echo hello world" and see if that works because my test does not create the hello world text file like it should. I appoligize for my newbness I am mostly a Unix / Linux programmer.
  • Comment on Re^9: Win32::Process - need help from an expert!

Replies are listed 'Best First'.
Re^10: Win32::Process - need help from an expert!
by ikegami (Patriarch) on Sep 13, 2007 at 16:02 UTC

    Batch files are in the same boat. They're not executables. You need to launch them via cmd just like you would need perl to execute perl scripts. The documentation for CreateProcess specifically mention batch files.

    It's just like unix. To execute a bash script, you need to run bash. The difference is that unix provides an automatic mechanism (#!) to load up a script in the proper handler, whereas one must manually call the mechanism (start) in Windows.