Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Running a server application from an ASP Page


Message #1 by "Aneeqah AneeqahVahed" <aneeqahv@u...> on Mon, 23 Dec 2002 15:37:03 +0200
Can anyone please HELP!! 

I am trying to run a Batch file from an ASP page which has to remotely 
execute a program 

within SAS. The client clicks a button that should tell the server to 
run the Batch file, 

which starts SAS on the server side which then executes my program and 
saves the results on 

to the server harddrive. The client is then able to view the tresults 
from the web. I have 

used both ASPExec and WScript and both of 
these work in the sense 

that it starts the batch file on the server. The problem is that I 
cannot see the process 

running on the server, ie: the batch file uses "cmd" and "SAS.exe" but 
neither of these 

programs are visible. They do however run as hidden process' and I 
know this because they 

appear in the process table. I thought, to see the process I should 
change the settings for 

WWWPublishing to "set active with desktop" but this was not the case. 
The thing is, the 

output file is never created and neither cmd or SAS can be terminated. 
I know that the batch 

file works because it runs perfectly as a stand alone, ie:when not 
called from the web page. 


DO u have any idea how to solve this ? 

Kind regards 


Aneeqah Vahed
University of the Western Cape
COE LAB
Tel  (xxx) xxx xxxx
Message #2 by aneeqahv@u... on Mon, 23 Dec 2002 13:55:17
I've tried the following
<HTML><HEAD>
<Script Language="VBScript" runat="server">
<!--
sub Tester()
set wshShell = Server.CreateObject("WScript.Shell")

wshShell.Run "cmd C:\\Inetpub\wwwroot\CourseEval\BATCHtester.bat" ,1,false
set wshShell=Nothing 
End Sub 
-->
</Script>
</head>
<BODY><INPUT id=button1 name=button1 type=button value=Button 
onclick= "Tester()">
 
</BODY></HTML>



  Return to Index