C#System.Diagnostics.Process使用例示

System.Diagnostics.Process.Start("notepad.exe");        //打开记事本

System.Diagnostics.Process.Start("calc.exe ");                //打开计算器

System.Diagnostics.Process.Start("regedit.exe ");           //打开注册表

System.Diagnostics.Process.Start("mspaint.exe ");         //打开画图板

System.Diagnostics.Process.Start("write.exe ");              //打开写字板

System.Diagnostics.Process.Start("mplayer2.exe ");        //打开播放器

System.Diagnostics.Process.Start("taskmgr.exe ");          //打开任务管理器

System.Diagnostics.Process.Start("eventvwr.exe ");          //打开事件查看器

System.Diagnostics.Process.Start("winmsd.exe ");           //打开系统信息

System.Diagnostics.Process.Start("winver.exe ");               //打开Windows版本信息

System.Diagnostics.Process.Start("mailto: "+ address);     // 发邮件


shutdown.exe:

参数:-s 关机   -r重启   -f强行   -t 时间    -a 取消关机   -l 注销    -i 显示用户界面

System.Diagnostics.Process.Start("shutdown.exe","-r");             //关闭并重启计算机

System.Diagnostics.Process.Start("shutdown.exe","-s -f");         //关闭计算机

System.Diagnostics.Process.Start("shutdown.exe","-s -f 30");    //30s后关闭计算机

System.Diagnostics.Process.Start("shutdown.exe","-l");              //注销计算机

System.Diagnostics.Process.Start("shutdown.exe","-a");             //撤销关闭计算机


  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值