Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I execute a bat file from ASP ?

Status
Not open for further replies.

sergeiY

Programmer
Feb 13, 2003
132
AU
This is related to topic of getting computerName out of the Win OS box

here is a link:
thread96-565498 know I can get server name via ASP Request.ServerVariables("LOCAL_ADDR") or Request.ServerVariables("SERVER_NAME") but it doesn't help me as it gets me IP of the web site but I need the actual box name as I have various apps running on the same box with different IP addresses and I don't want to translate that this IP is this box etc

So my question is can I execute a bat file and grab its output ?

What I want to do is to execute this line in DOS:
echo %computername%

Is is possible ? Or ... maybe I can use some other ways of getting this info without use of enviroment variables ?

Thank you

Sergei
 

____________________________________________________
$str = "sleep is good for you. sleep gives you the energy you need to function";
$Nstr = ereg_replace("sleep","coffee",$str); echo $Nstr;

onpnt2.gif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top