zoukankan
html css js c++ java
ASP.NET运行.bat文件
//
Create the ProcessInfo object
System.Diagnostics.ProcessStartInfo psi
=
new
System.Diagnostics.ProcessStartInfo(
"
cmd.exe
"
);
psi.UseShellExecute
=
false
;
psi.RedirectStandardOutput
=
true
;
//
psi.RedirectStandardInput = true;
psi.RedirectStandardError
=
true
;
psi.Arguments
=
"
/K C:\\temp\\test.bat
"
;
psi.WorkingDirectory
=
"
c:\\temp\\
"
;
//
Start the process
System.Diagnostics.Process proc
=
System.Diagnostics.Process.Start(psi);
//
Attach the output for reading
System.IO.StreamReader sOut
=
proc.StandardOutput;
proc.Close();
//
Read the sOut to a string.
string
results
=
sOut.ReadToEnd().Trim();
sOut.Close();
//
Write out the results.
string
fmtStdOut
=
"
<font face=courier size=0>{0}</font>
"
;
this
.Response.Write(String.Format(fmtStdOut, results.Replace(System.Environment.NewLine,
"
<br>
"
)));
查看全文
相关阅读:
Vue 中的无状态组件
如何在 Vue 中使用 JSX 以及使用它的原因
webpack打包优化的四种方法(多进程打包,多进程压缩,资源 CDN,动态 polyfill)
watch监听对象
微信小程序动态设置图片大小
Flutter的生命周期和路由
两个字符串的编辑距离学习[转载]
系统进化树怎么看[转载]
感知机PLA算法实现[转载]
余弦相似度计算[转载]
原文地址:https://www.cnblogs.com/top5/p/1681287.html
最新文章
时间,
到万,
uitextfield 监听变化,
发短信,
裁切图片,
手机号码,用string类型,
axios拦截器
全局的 axios 默认值
axios之Vue请求初始化数据放在Created还是Mounted?
axios用法全解
热门文章
Vue中swiper手动滑动后不能自动播放的解决方法
vue之ajax
小程序和Vue利用swiper实现icons分页显示--动态计算
动态加载swiper,默认显示最后一个swiper-slide解决方案???
git积累
vue中修改swiper样式
如何实现图形验证码?
监听Canvas内部元素点击事件的三种方法
Css媒体查询以及常用设置
css伪元素::after和::before,及图标字体的使用
Copyright © 2011-2022 走看看