Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Can't spawn "cmd.exe"
January 20, 2009, 2:45 pm
rate this thread
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"
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.
Linux SQA Engg.
- » FAQ 4.29 How can I count the number of occurrences of a substring within a string?
- — Previous thread in » PERL Discussions