在 vb.net 2008 中,我想执行驻留在另一台计算机上的批处理文件。没有错误,但没有任何反应。这是代码:
Dim pStart As New System.Diagnostics.Process
Dim startInfo As New System.Diagnostics.ProcessStartInfo(serverpath & "\file.bat")
startInfo.RedirectStandardOutput = True
startInfo.WindowStyle = ProcessWindowStyle.Hidden
startInfo.UseShellExecute = False
pStart = System.Diagnostics.Process.Start(startInfo)
pStart.WaitForExit()
pStart.Close()