[英]Getting an Exception System.ComponentModel.Win32Exception : The system cannot find the file specified in Sikuli C#
[英]Does anyone know how to fix: System.ComponentModel.Win32Exception: 'The system cannot find the file specified' from visual studio?
private void button1_Click(object sender, EventArgs e)
{
_ = Process.Start("C:/Users\riley/Desktop\astrobotrq.txt");
}
试试这个:
Process.Start("C:\\Users\\riley\\Desktop\\astrobotrq.txt");
这对你Process.Start(@"C:\Users\riley\Desktop\astrobotrq.txt");
. 您正在使用/
而不是\
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.