在这里插入代码片
这个问题是因为少加了一行代码导致的p.StartInfo.UseShellExecute = true;
static void Main(string[] args) { //使用进程打开指定的文件 ProcessStartInfo psi = new ProcessStartInfo(@"C:\Users\19786\Desktop\20210604.docx"); Process p = new Process(); p.StartInfo = psi; p.StartInfo.UseShellExecute = true; p.Start(); Console.ReadKey(); }
System.ComponentModel.Win32Exception:“The specified executable is not a val
最新推荐文章于 2023-09-08 09:55:31 发布