in reply to Re: system command can't spawn cmd.exe
in thread system command can't spawn cmd.exe

I had this issue with some perl scripts I had inherited at work (activeperl 5.6 on server 2003). It turned out to be the way the script was being called from the command line (scheduled .cmd file). e.g. c:\scripts>script.pl (resulted in the can't spawn message) however specifying perl before calling the script which is best practice anyway allowed it to work fine: c:\scripts>PERL script.pl (allows the command line call from within the perl script to work fine).
  • Comment on Re^2: system command can't spawn cmd.exe

Replies are listed 'Best First'.
Re^3: system command can't spawn cmd.exe
by Anonymous Monk on Apr 12, 2014 at 18:09 UTC
    Fixed on Windows 7, 64 bits command prompt adding the cmd.exe path in PATH like this: set PATH=%PATH%;C:\Windows\SysWOW64
      Yes this path setting works on Windows 7, 64 bit. Thanks for the this hint Fairoz.