使用useshellexecute从wince 6.0上的C#运行程序

问题描述:

我再次需要一些帮助。



我使用.net Compact Framework和编程语言C#为运行WinCE 6.0的移动设备开发。 b $ b

我的尝试:



我想要完成的是以编程方式从c#执行exe而不扩展。为此,该应用程序运行以下代码:



ProcessStartInfo processStartInfo = new ProcessStartInfo();



I once again need some help.

Im using the .net Compact Framework and the programming language C# to develop for mobile devices that are running WinCE 6.0.

What I have tried:

What I want to accomplish is to programmatically execute exe from c# without extension. To do so, the app runs the following code :

ProcessStartInfo processStartInfo = new ProcessStartInfo();

// FOR WINCE

     processStartInfo.FileName = @"\vortex\res.exe";
     processStartInfo.UseShellExecute = false;
     Process.Start(processStartInfo);







现在我的问题是,如果我在wince 5.0中将res.exe更改为任何扩展名(例如res.dat)它将调用该文件并运行它,但在wince 6.0中它给出了如下错误:



系统无法找到指定的文件。

参数UseShellExecuten似乎没有在wince 6.0中显示任何效果。



I希望你明白这个想法。



非常感谢提前。




Now my problem is, that if i changed the res.exe to any extenstion(for example res.dat) in wince 5.0 it will call the file and run it,but in wince 6.0 it give me error like:

The System Cannot find the File Specified.
The parameter UseShellExecuten doesnt seem to show any effect in the wince 6.0.

I hope you get the idea.

Many thanks in advance.

我相信你需要一个完整的限定路径(包括驱动器号)。
I believe you need a fully qualified path (including the drive letter).