Discussion Locked

Call Command Line Program from NT Web Se

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I would like to call a command line utility (Oracle's tnsping) from a web page on a WindowsNT server. This is merely a way to give users a feel for whether the database is up and running and how responsive it is.

Any ideas on how to call a command line function and redirect the response back to a web page? I would prefer server side only code, but can live with some client side. I could probably do a COM module, but was hoping for something simpler.

2 replies

by kirya

You can use AspExec from http://serverobjects.com/products.htm#free

And use page Some_Title.asp with following content:

--- Header ---
<%
Set Executor=Server.CreateObject("ASPExec.Execute")
Executor.Application = "tnsping"
strResult = Executor.ExecuteDosApp
Response.Write " tnsping returned : " & strResult
%>
--- Footer ---

Or, may be you can execute .bat-file on your server as CGI program.

This discussion is closed to new replies.