Hello,
If I shell out to a .bat file, is it possible to return any output back to the ASP directly, or do I need to write the output to a text file, then read that back in?
At the moment I have the following:
It's not a big problem if I have to subsequently read in the output txt file, I was just wondering if there was another way.
Thanks
If I shell out to a .bat file, is it possible to return any output back to the ASP directly, or do I need to write the output to a text file, then read that back in?
At the moment I have the following:
Code:
Dim objShell, iReturn
set objShell = server.createobject("wscript.shell")
iReturn = objShell.run(request.servervariables("APPL_PHYSICAL_PATH") & "bat_test.bat > " & request.servervariables("APPL_PHYSICAL_PATH") & "bat_output.txt", 0, True)
Response.Write iReturn 'Zero if successful
set objShell = nothing
It's not a big problem if I have to subsequently read in the output txt file, I was just wondering if there was another way.
Thanks