This ticket is not a duplicate of this popular question since the solution there does not fix the problem. Rather I think it has to do with calling a file that's residing in the %WINDIR%\System32
directory, because calling a batch file with anything else seems to work.
I have a batch file with the the following contents:
telnet 10.147.36.20 11211
pause
I kick it off by executing the following code:
var psi = new ProcessStartInfo(entry.ExecutablePath);
Process.Start(psi);
I get the following:
'telnet' is not recognized as an internal or external command,
operable program or batch file.
even though if I execute telnet 10.147.36.20 11211
from the command line, it works perfectly fine.
I've tried telnet.exe
, c:\windows\system32\telnet.exe
, start telnet.exe
and other variations, but nothing seems to work.
What am I missing?