我从bcdedit /set current safeboot network应用程序中执行了命令C#,这是我在终端中得到的错误:
指定的元素数据类型无法识别,也不适用于指定的条目。运行"bcdedit /?“用于命令行协助。元素找不到。
这是我的密码:
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
startInfo.FileName = "cmd.exe";
startInfo.UseShellExecute = true;
startInfo.Verb = "runas";
startInfo.Arguments = @"/C bcdedit /set current safeboot network & ping 8.8.8.8 -t";
//startInfo.Arguments = "/C ping 8.8.8.8 -t";
process.StartInfo = startInfo;
process.Start();发布于 2019-05-13 11:08:02
问题是我漏掉了“当前”一词的括号:
startInfo.Arguments = @"/C bcdedit /set {current} safeboot network & ping 8.8.8.8 -t";https://stackoverflow.com/questions/56110887
复制相似问题