摘要:
官方文档地址:http://support.microsoft.com/kb/311272/zh-cndevcon的参数如下:====================================================devcon.exe [-r] [-m:\\<machine>] <command> [<arg>...]-r if specified will reboot machine after command is complete, if needed.<machine> 目标机器名字.<command> 命令 阅读全文
摘要:
http://archive.cnblogs.com/a/1743707/前段时间,经常使用C#调用控制台程序,便写了一个通用的方法,起初可以正常工作,直到遇到控制台程序输出内容较多时,发现控制台程序无法自动终止(任务管理器中始终有这个控制台进程,cpu使用率0),查阅msdn,才知道原来出现了死锁现象。下面是最初的代码: /// <summary> /// common method to execute tool /// </summary> /// <param name="toolFile">tool's path< 阅读全文
摘要:
c#检测网络连接问题我没有看到好的方法,都是通过与外网(或者局域网服务器)传递信息检测的。我看些下下来了代码: private void button1_Click(object sender, EventArgs e) { string ip; ip = "10.1.148.1"; // string ip = "192.192.132.229"; // string strRst = CmdPing(ip); // MessageBox.Show(strRst); string str = CmdPingh(ip); MessageBox.Show( 阅读全文