Discussion Locked

how to run .exe file from .asp file

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
how can i run an .exe file (created using vb5.0 or vc) from my .asp file, tyr to explain with example.

5 replies

by crshnbrn

You can't run a file from and internal command. You can, however, shell to WSH:

<% Response.Buffer = True %>
<%
Dim mycmd, myfile, wsh
mycmd = "c:\java"
myfile = "filename"

Set wsh = CreateObject("WScript.Shell")
Response.Write wsh.run("cmd /c " & mycmd & " " & file & "")
Set wsh = Nothing
%>

by dan_cohen

The quick and dirty answer is that you can't. The example of Answer1 will only run a file on the webserver, not the client's workstation.

This discussion is closed to new replies.