Can't spawn "cmd.exe"

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Dear Perl Gurus,

I have a perl program that can work in command line mode or GUI mode
(with Tk). In CLI mode it works fine, in GUI it sometimes throws an

   Can't spawn "cmd.exe": No such file or directory

when call to system is made. I run this program in clean VM with WinXP
and default settings. The path is set to:


and cmd.exe is as usual in C:\Windows\system32.

I'm trying to figure out why I'm getting this error and why only when
Tk GUI is activated. By experimentation I found out that the error
occurs when cmd.exe is located in the very first dir on the path. It
is already enough to change the path to (add semicolon in front):


to get rid of that error. Still, I would like to understand what might
trigger that odd behaviour.



Re: Can't spawn "cmd.exe"

Never mind, I've located the bug.



Re: Can't spawn "cmd.exe"

responding to
dshirsath wrote:

T3X wrote:

Quoted text here. Click to load it

The same error I was getting when did installation of Win32::GuiTest and
trying to run the script. The problem was not with the module but when
trying to run the 'system' function of Perl in Windows XP OS. The 'system'
function trying to execute using cmd.exe command which is present in
c:\Windows\System32, when I copied the cmd.exe to c:\Windows\System then
it works fine.

Devendra Shirsath
Linux SQA Engg.

Site Timeline