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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running a .exe file from asp

Status
Not open for further replies.

pilg

Programmer
Feb 16, 2001
82
GB
I need to run an exe file from my web application, does anyone know of a way of doing this in ASP, I've tryed using windows script but this only seems to work on windows 95-98-2000 and not on NT, if there isn't a way could anyone think of another way of doing this, any ideas will be greatly appreciated Thanks, Pilg.
 
I'm a little confused by your question. You can't run anything on the client side from ASP. On the server side you can use WSH on any Windows platform if you have WSH installed. NT needs SP 4 or 5 (can't remember which).

If necessary you could also create a VB COM+ component and call it as an object from the ASP page. The COM+ component could then execute the program(s).

Regards, Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
I've installed the scripting host and the browser doesn't give me any errors but it doesn't seem to execute the file, but when I run the program on a windows 98 platform it brings up a new window, eg if I run notepad the notepad window will pop up, is there any permissions I need to set or anything like that?
 
Show us your code. Rob
robschultz@yahoo.com
-Focus on the solution to the problem, not the obstacles in the way.-
 
<%
set wshell = server.CreateObject(&quot;wscript.shell&quot;)
wshell.run &quot;C:\Inetpub\
set wshell=nothing
%>

This opens windows explorer and displays the contents on my windows 98 machine, But does not work on my NT machine, also it gives no errors. Have you got any idea's, Thanks Pilg.
 
I could be way off the mark not having experimented myself, but possibly you should tell it what application you want to use?
I think Windows 9x defaults to opening Explorer given the above line, but NT probably wouldn't.

Maybe something like

wshell.run &quot;c:\windows\explorer.exe &quot;&quot;C:\Inetpub\
though it's probably in the WinNT directory or wherever it is in NT - can't remember and don't have it installed at home
Ben
+61 403 395 052
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top