General discussion

Locked

Call Command Line Program from NT Web Se

By Wayne M. ·
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.

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Call Command Line Program from NT Web Se

by kirya In reply to Call Command Line Program ...

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.

Collapse -

Call Command Line Program from NT Web Se

by Wayne M. In reply to Call Command Line Program ...

Thanks, this looks exactly like what I was looking for.

- Wayne

Back to Web Development Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums