用process类 如何关闭IIS 或者 发送dos命令 1,process能直接关闭iis服务吗?2,如果发送dos命令 net stop w3svc 怎么才能在后台执行? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 p = new Process();p.StartInfo.FileName = "cmd.exe";p.StartInfo.UseShellExecute = false;p.StartInfo.RedirectStandardInput = true;p.StartInfo.RedirectStandardOutput = true;p.StartInfo.CreateNoWindow = true;p.Start();p.StandardInput.WriteLine("net stop w3svc");// 向cmd.exe输入commandp.StandardInput.WriteLine("exit"); using (ServiceController sc = new ServiceController("w3svc")){ sc.Stop();} 求一则正则表达式,筛选出前面是为<br>或者为没有任何字符 请教正则表达式写法 GZipStream 有没有验证军官证的正则表达式 我要把string的218转成int32的536,就是string的16进制转成int,c#里有没有这样的类? 100分急求c#接受126邮箱邮件的方法 求救,为什么我的windows服务无法启动? 求一正则表达式,或者截取函数,匹配<?xml.*</EMC>中内容,文档中可能有多个块,还有不正常的格式 请问如何写实体类?请大家给点理论知识。 关于COOKIE的问题…… hashtable无关联COPY问题 求一个教师分房管理系统
p.StartInfo.FileName = "cmd.exe";
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.CreateNoWindow = true;
p.Start();
p.StandardInput.WriteLine("net stop w3svc");// 向cmd.exe输入command
p.StandardInput.WriteLine("exit");
{
sc.Stop();
}