in reply to Re: Win32::Process::Create fails when i use ">" to redirect the screen output to a file
in thread Win32::Process::Create fails when i use ">" to redirect the screen output to a file

tool.exe is not a shell, it isn't processing "> log.txt 2>&1" so stop giving it that, it doesn't know what to do with that information

The program you want to call is cmd.exe, read more at  help cmd and Win32::Process redirect CMD output to text file

  • Comment on Re^2: Win32::Process::Create fails when i use ">" to redirect the screen output to a file
  • Download Code

Replies are listed 'Best First'.
Re^3: Win32::Process::Create fails when i use ">" to redirect the screen output to a file
by prayaspatel (Initiate) on Aug 28, 2012 at 20:20 UTC

    its working when i use "cmd.exe" and provide " too.exe -h" as commandline but the problem is when i want to kill it its killing cmd.exe....but actully i wanted to kill tool.exe

      Which is the same problem in the other thread which is unsolved. Perhaps use Win32::Process::List to get the process id to kill and then do Win32::Process::Open on that PID, and kill it that way.