的Process.Start(" TELNET.EXE")抛出异常 [英] Process.Start("telnet.exe") throws exception

查看:412
本文介绍了的Process.Start(" TELNET.EXE")抛出异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有W2K8 R2 64运行两个应用程序,一种是编译为64位,另一个为32位,因为它有COM的依赖关系。 在这两个我试图拨打:

I have two applications running on W2k8 R2 x64, one is compiled as 64bit and the other one as 32bit as it has COM dependencies. In both I'm trying to call:

Process p = Process.Start("telnet.exe", string.Format("{0} {1}", address, port));

在64它工作完全正常,但是在32位的一个我得到一个System.ComponentModel.Win32Exception(以下简称系统找不到指定的文件)?

In the x64 it works perfectly fine, however in the 32bit one I get a System.ComponentModel.Win32Exception ("The system cannot find the file specified")?

任何想法是怎么回事?即使我称之为

Any idea what's going on here? Even if I call

的Process.Start(@C:\ WINDOWS \ SYSTEM32 \ TELNET.EXE)

我得到同样的异常?

谢谢

汤姆

推荐答案

从32位应用程序启动SYSTEM32位于64位的应用程序(至少在Vista中,2k8,7,不能在64位XP或2K3工作)运行从sysnative目录,即C:\ WINDOWS \ sysnative \ TELNET.EXE(或者禁用WOW64但是这通常是一个坏主意)。

To launch a system32 located 64bit app from a 32bit app (at least on Vista,2k8,7, doesn't work on x64 XP or 2k3) run it from the sysnative directory, i.e. "C:\windows\sysnative\telnet.exe" (alternatively disable Wow64 but that is generally a bad idea).

这篇关于的Process.Start(" TELNET.EXE")抛出异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆