Dear all,
Does anyone know how to run Dos batch file from ASP.Net.
I thought, I could use Shell("C:\Test\JRNE.bat") to run it, but it didn't work.
Sheel command works for "net send" and calls some exe files, like calc.exe.
Thanks,
Kusno.
Dear all,
Does anyone know how to run Dos batch file from ASP.Net.
I thought, I could use Shell("C:\Test\JRNE.bat") to run it, but it didn't work.
Sheel command works for "net send" and calls some exe files, like calc.exe.
Thanks,
Kusno.
I have found the answer from Microsoft VS 2005 documentation.
Dim procID As Integer
Dim newProc As Diagnostics.Process
newProc = Diagnostics.Process.Start("C:\Test\JRNE.bat")
procID = newProc.Id
newProc.WaitForExit()
Dim procEC As Integer = -1
If newProc.HasExited Then
procEC = newProc.ExitCode
End If
But doesn't solve my problem.
Because in JRNE.bat, it tries to open FTP.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.