谁帮忙解决下ASP.NET的bat批处理的问题
来源:互联网 发布:部落冲突九本科技数据 编辑:程序博客网 时间:2024/05/18 02:16
在ASP.NET尝试了很多方法都没解决BAT批处理的问题,有那位高手帮忙一下.
下面是源代码:
C#:
public partial class a : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
//Process proc = new Process();
// System.Diagnostics.Process.Start("cmd.exe /c cmdtest.bat","9999");
System.Diagnostics.Process.Start("cmd.exe" + " /c " + "cmdtest.bat " + "9999");
// proc.WaitForExit();
}
}
或者:
protected void Page_Load(object sender, EventArgs e)
{
Process proc = new Process();
// System.Diagnostics.Process.Start("cmd.exe" + " /c " + "D://aaa//demo.bat");
// System.Diagnostics.Process = System.Diagnostics.Process.Start("cmd.exe", " /c " + "D://aaa//demo.bat");
// proc.WaitForExit();
//proc.StartInfo.Arguments ="ffmpeg -i " + avs + " " + outFile;
// proc.StartInfo.Arguments = "c/ demo.bat";
// proc.Start();
// proc.Start("cmd.exe", "/c TEST3.BAT A");
// System.Diagnostics.Process.WaitForExit();
// proc.WaitForExit();
// proc.UseShellExecute = true;
// proc.CreateNoWindow = false;
// proc.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
// System.Diagnostics.Process.Start(proc);
}
VB.NET:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Dim proc As System.Diagnostics.Process
'proc = System.Diagnostics.Process.Start("cmd.exe", " /c " & "name.bat")
' proc.WaitForExit()
' Dim WSH = Server.CreateObject("WScript.Shell") '建立一个wscript.shell对象
' Dim RTL = WSH.Run("D:/aaa/name.bat", 1, True)
'If RTL = 0 Then
'Response.Write("OK")
'Else
'Response.Write("ERR")
'End If
Shell("cmd.exe /c name.bat")
'Shell("cmd.exe /c D:/aaa/name.bat", AppWinStyle.NormalFocus)
' Dim p As New System.Diagnostics.Process
' p.StartInfo.FileName = "cmd.exe"
' p.StartInfo.Arguments = " /c " & "D:/aaa/demo.bat"
' p.StartInfo.UseShellExecute = False
' p.StartInfo.RedirectStandardInput = True
' p.StartInfo.RedirectStandardOutput = True
' p.StartInfo.RedirectStandardError = True
' p.StartInfo.CreateNoWindow = False
' p.Start()
' Dim strValue As String = p.StandardOutput.ReadToEnd()
' Server.CreateObject("WSCRIPT.SHELL").run(Server.MapPath("name.bat"))
有很多代码我加了注解没去掉的.
- 谁帮忙解决下ASP.NET的bat批处理的问题
- [VB.NET]VB.net 读写ini的问题,希望好心人贡献下时间,帮忙解决下~~
- 待解决的问题,谁帮忙点破下!
- Repeater问题。知道的麻烦帮忙解决下
- 批处理不同目录下的bat调用
- C#ASP.NET执行BAT批处理代码
- 急求大神帮忙解决的问题
- 大家帮忙推荐下,学习asp.net的书籍给我吧
- [VB.NET]关于DataGridView的问题,会的请进来看看,帮忙解决!!
- 批处理解决环境变量的问题
- 一个自动布署.net网站的bat批处理实例
- 解决ASP.NET不能调试的问题。
- ASP.NET页面缓存问题的解决
- ASP.NET中文乱码问题的解决
- 没解决的问题,如果你看到了请帮忙解答下好吗?
- windows 批处理 bat 删除一个目录下的文件夹
- .bat批处理 搜索当前目录及子目录下的文件
- windows下bat批处理中%cd%和%~dp0的区别
- BS和CS的联系与区别
- 清空日志
- BEA广州UserGroup招募Speaker
- 怎么样大批量的更新数据而不影响正常业务
- 怎么对IN子查询使用绑定变量
- 谁帮忙解决下ASP.NET的bat批处理的问题
- 我来了
- C/C++笔试(1)
- strncmp函数
- C/C++笔试题(2)
- 并发容易出现的问题与并发控制
- 怎么使用object与record类型返回表类型数据
- 2005年中兴笔试题
- 知道URI、URL和URN都是什么吗?