会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
代码改变世界
Cnblogs
Dashboard
Login
Home
Contact
Gallery
Subscribe
RSS
Rui
细节决定成败!
在.net平台下,执行命令行
2007-05-14 14:03
ruinet
阅读(
404
) 评论(
0
)
编辑
收藏
举报
//
---格式一
System.Diagnostics.Process.Start(
"
CMD.exe
"
,
"
/c net send 10.116.193.89 你好!
"
);
//
System.Diagnostics.Process.Start("cmd.exe","/c ipconfig");
//
---格式二
Process MyProcess
=
new
Process();
MyProcess.StartInfo.FileName
=
"
CMD.exe
"
;
MyProcess .StartInfo.CreateNoWindow
=
true
;
MyProcess.StartInfo.Arguments
=
"
/c ipconfig
"
;
MyProcess.StartInfo.WindowStyle
=
ProcessWindowStyle.Hidden;
//
使窗体不显示出来
MyProcess.Start();
//
----格式三
System.Diagnostics.Process.Start(
"
IExplore.exe
"
,
"
D:
"
);
System.Diagnostics.Process.Start(
"
IExplore.exe
"
,
"
www.baidu.com
"
);
会员力量,点亮园子希望
刷新页面
返回顶部
About
free web counter