Process p=new Process();
p.StartInfo.FileName="net.exe";
p.StartInfo.Arguments=" use "+NetUseArg;
p.StartInfo.UseShellExecute=false;
p.StartInfo.RedirectStandardOutput=true;
p.StartInfo.RedirectStandardInput=true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow=true;
p.StartInfo.FileName="net.exe";
p.StartInfo.Arguments=" use "+NetUseArg;
p.StartInfo.UseShellExecute=false;
p.StartInfo.RedirectStandardOutput=true;
p.StartInfo.RedirectStandardInput=true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.CreateNoWindow=true;
解决方案 »
- COM+问题
- c# 怎么把一个双引号赋值给一个string 变量?
- 初学,使用两个using编译错误了
- winform中,如何得到控件距显示器的left和Top
- 选择datagridview 单元格时如何获取单元的坐标?(就是 x,y 的值 我要代码详细的啊)
- 请问一个LIST<>变量调用add或者remove方法后怎么能触发个事件?
- 关于显微镜下图片的处理
- 如何做浮动的工具条,就象OICQ的一样能隐藏,但显示出来的时候要平滑,不要跳动,请指教
- 请教:如何解决:找不到类型和命名空间名称“Bitmap”
- 如何找到回收站所在目录??
- 关于在gridview中用计算字段的问题
- javascript中取。cs中的数组值
Process p=new Process(); //创建进程对象
p.StartInfo.FileName="net.exe"; //设定需要执行的命令程序
p.StartInfo.Arguments=" use "+NetUseArg; 设定参数,要输入到命令程序的字符
p.StartInfo.UseShellExecute=false; //不使用系统外壳程序启动
p.StartInfo.RedirectStandardOutput=true; 重定向输出,而不是默认的显示在dos控制台上
p.StartInfo.RedirectStandardInput=true; //重定向输入
p.StartInfo.RedirectStandardError = true; //重定向錯誤輸出
p.StartInfo.CreateNoWindow=true; //不创建窗口