faqts : Computers : Programming : Languages : Asp : ASP/VBScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

36 of 69 people (52%) answered Yes
Recently 5 of 10 people (50%) answered Yes

Entry

How to run an exe file from the aps page, that is this should execute an application
I tried this script to run .exe file on the server side. But the exe file did not run. What should I
I tried this script to run exe file on the server side.But the exe file didn't run.What should I do?
what is %compspec%

Sep 4th, 2002 13:59
Robin Paardekam, MRN Murthy, Angelo Santos, Muruganandham K, http://www.paardekam.nl


Not very clear what you exactly want to do. If you want to execute an 
executable file on the CLIENT side (machine of the visitor): impossible 
by using ASP.
But if you mean that you want to execute a file on the webserver, than 
take a look at the following code. This will do I guess. 
<%
Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c FILENAME.EXE"
%>
As you might guessed: replace FILENAME.EXE with the file you wish to 
execute. 
Good luck, hope this helps.
Robin Paardekam
http://www.paardekam.nl



© 1999-2004 Synop Pty Ltd