关于程序调用win7自带的telnet功能的疑问,该如何处理
关于程序调用win7自带的telnet功能的疑问
首先,我已十分确定一定以及肯定已经安装了win7自带的telnet功能。
在cmd上,敲telnet,可以转入telnet的客户端命令行。
欢迎使用 Microsoft Telnet Client
Escape 字符为 'CTRL+]'
Microsoft Telnet>
可为什么用createprocess启用起来的cmd.exe,却不能用telnet?随便其他的ping,就可以。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
D:\其他工程\HelloWorld\2>telnet
telnet
'telnet' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
D:\其他工程\HelloWorld\2>ping 127.0.0.1
ping 127.0.0.1
正在 Ping 127.0.0.1 具有 32 字节的数据:
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=64
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=64
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=64
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=64
127.0.0.1 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 0ms,最长 = 0ms,平均 = 0ms
D:\其他工程\HelloWorld\2>
即使是我先cd到telnet.exe的当前目录,也说找不到这个文件。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
D:\其他工程\HelloWorld\2>c:
c:
C:\>cd Windows
cd Windows
C:\Windows>cd system32
cd system32
C:\Windows\System32>telnet.exe
telnet.exe
'telnet.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:\Windows\System32>.\telnet.exe
.\telnet.exe
'.\telnet.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:\Windows\System32>type .\telnet.exe
type .\telnet.exe
系统找不到指定的文件。
C:\Windows\System32>type .\ping.exe
type .\ping.exe
记w跃莣厸3繻???€8?鑻YY吚t+婡$凌餍冟荅
ing"
------解决方案--------------------
在你的程序运行的cmd里面
dir c:\windows\sysnative\telnet.exe
首先,我已十分确定一定以及肯定已经安装了win7自带的telnet功能。
在cmd上,敲telnet,可以转入telnet的客户端命令行。
欢迎使用 Microsoft Telnet Client
Escape 字符为 'CTRL+]'
Microsoft Telnet>
可为什么用createprocess启用起来的cmd.exe,却不能用telnet?随便其他的ping,就可以。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
D:\其他工程\HelloWorld\2>telnet
telnet
'telnet' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
D:\其他工程\HelloWorld\2>ping 127.0.0.1
ping 127.0.0.1
正在 Ping 127.0.0.1 具有 32 字节的数据:
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=64
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=64
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=64
来自 127.0.0.1 的回复: 字节=32 时间<1ms TTL=64
127.0.0.1 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 0ms,最长 = 0ms,平均 = 0ms
D:\其他工程\HelloWorld\2>
即使是我先cd到telnet.exe的当前目录,也说找不到这个文件。
Microsoft Windows [版本 6.1.7601]
版权所有 (c) 2009 Microsoft Corporation。保留所有权利。
D:\其他工程\HelloWorld\2>c:
c:
C:\>cd Windows
cd Windows
C:\Windows>cd system32
cd system32
C:\Windows\System32>telnet.exe
telnet.exe
'telnet.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:\Windows\System32>.\telnet.exe
.\telnet.exe
'.\telnet.exe' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
C:\Windows\System32>type .\telnet.exe
type .\telnet.exe
系统找不到指定的文件。
C:\Windows\System32>type .\ping.exe
type .\ping.exe
记w跃莣厸3繻???€8?鑻YY吚t+婡$凌餍冟荅
ing"
------解决方案--------------------
在你的程序运行的cmd里面
dir c:\windows\sysnative\telnet.exe