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>
"
)));
查看全文
相关阅读:
小程序后端获取openid (php实例)
原生sql查询返回结果集处理方法
关于生成的时间戳和当前时间不相符的问题
数据结构的基本概念学习
TensorFlow框架(6)之RNN循环神经网络详解
TensorFlow框架(5)之机器学习实践
TensorFlow框架(4)之CNN卷积神经网络详解
TensorFlow框架(3)之MNIST机器学习入门
TensorFlow框架(2)之TensorBoard详解
TensorFlow框架(1)之Computational Graph详解
原文地址:https://www.cnblogs.com/top5/p/1681287.html
最新文章
新建mapping
IK分词器插件
elasticsearch的索引清理
elasticsearch配置优化
Linux 设备和模块的分类
计算机网络: IP地址,子网掩码,网段表示法,默认网关,DNS服务器详解
Automator 实例:使用快捷键 实现 快速在当前路径 打开 iTerm
mac 在 finder 当前 路径下 打开 terminal 的办法
js正則函數 match、exec、test、search、replace、split 使用介紹集合
在Spring中基于JDBC进行数据访问时如何控制超时
热门文章
Understanding JDBC Internals & Timeout Configuration
Spring事务超时时间可能存在的错误认识
JDBC超时原理与设置
log4j.properties
workerman搭建聊天室
oss文件上传删除(批量删除)处理
jwt鉴权学习 (php示例代码)
微信公众号模板消息推送功能
php在线预览pdf文件
微信公众号获取openid(php实例)
Copyright © 2011-2022 走看看