c# - Win32Exception 参数不正确

标签 c# process.start win32exception

exe 文件使用 Process.Start() 但它抛出“Win32Exception 参数不正确”。

Process p = new Process();
Process.Start("C:\Program Files\APS2PP\keyl2000.exe");

我可以通过命令提示符成功运行这个文件。

最佳答案

Process.Start("C:\Program Files\APS2PP\keyl2000.exe")

在字符串前使用双反斜杠或@。

 Process.Start(@"C:\Program Files\APS2PP\keyl2000.exe");

关于c# - Win32Exception 参数不正确,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4936150/

相关文章:

c# - LINQ 查询按某些条件将有序列表拆分为连续点的子列表

C# 接口(interface)转换...字典查找?

c# - 打印异常 : The device is not ready

c# - 抛出 Win32Exception

c# - 在 C# 代码中存储密码安全吗?

c# - 自定义 C# 窗体设计

c# - Process.start:如何获得输出?

c# - Process.Start ("Excel.exe") 立即退出

c# - 使用 Process.Start : Firefox not starting when you set Usename and Password 启动 Firefox