问题如下:
1.Process ps=new Process();
ps.StartInfo.FileName="c:\\abc\\abc.exe";
ps.Start(); 2.ShellExecute(this.Handle,"open","abc.exe","","c:\\abc\\", 5); 运行1报错,运行2可以,为什么? abc.exe 是delphi编译完成的,换一个delphi可执行文件,上述两个都可以,为什么?
1.Process ps=new Process();
ps.StartInfo.FileName="c:\\abc\\abc.exe";
ps.Start(); 2.ShellExecute(this.Handle,"open","abc.exe","","c:\\abc\\", 5); 运行1报错,运行2可以,为什么? abc.exe 是delphi编译完成的,换一个delphi可执行文件,上述两个都可以,为什么?
{
System.Diagnostics.Process.Start("c:\\abc\\abc.exe");
}
catch ()
{
MessageBox.Show("not find !");
}
ps.StartInfo.FileName="c:\abc\abc.exe";
ps.StartInfo.WorkingDirectory = @"c:\abc\";
ps.Start();
ps.StartInfo.FileName=@"c:\abc\abc.exe";
ps.StartInfo.WorkingDirectory = @"c:\abc\";
ps.Start();