asp.net执行bat批处理文件的问题
chlei 2011-09-26 12:48:38 asp.net执行bat批处理文件,在自己的机器上(windows 7)完全没有问题,
但是到了服务器上,就不行执行了,
服务器的操作系统是windows 2003
是否代码有什么问题呢,请帮我看看
代码如下
Process process = new Process();
ProcessStartInfo startInfo = new ProcessStartInfo();
startInfo.FileName = " cmd.exe ";
startInfo.Arguments = @" /c D:\status.bat";
startInfo.UseShellExecute = false;
startInfo.RedirectStandardInput = false;
startInfo.RedirectStandardOutput = false;
startInfo.CreateNoWindow = true;
process.StartInfo = startInfo;
process.Start();
process.WaitForExit();
process.Dispose();