摘要: 命令: wmic diskdrive get Name, Model, SerialNumber 执行结果: 如果不需要字段名,可以通过 more 命令来截取,more +1 表示从第一行开始返回 wmic diskdrive get Name, Model, SerialNumber | more 阅读全文
posted @ 2021-08-11 20:21 一菲聪天 阅读(78) 评论(0) 推荐(0) 编辑
摘要: 把结果作为一个整体返回: 1 public static string ExecuteCommandSync(object command) 2 { 3 try 4 { 5 // create the ProcessStartInfo using "cmd" as the program to be 阅读全文
posted @ 2021-08-11 12:06 一菲聪天 阅读(899) 评论(0) 推荐(0) 编辑