|
-
Jul 14th, 2000, 10:58 AM
#1
Thread Starter
Lively Member
How do I run (shell) an executable from VB Script? Source appreciated.
-
Jul 14th, 2000, 11:02 AM
#2
Addicted Member
thanks to Mark Sreeves
this is mark's code:
Code:
Option Explicit
Public Function RunExe(ByVal Filename As String) As Long
On Error Resume Next
Shell Filename
'return the error if any
RunExe = Err.Number
End Function
compile this as a dll, register is, and then call it with the file you want to run from asp.
dvst8
all kudos to mark
Secret to long life:
Keep breathing as long as possible.
-
Jul 14th, 2000, 03:59 PM
#3
New Member
I have launched one .exe from ASP using VBSCript. My .exe is an ActiveX exe, suppose the Name is AAA.exe. Here is the code sample:
<%
response.redirect("http://YourIP/aaa.exe")
%>
<object height="0%" width="0%" ID="AAA" CLASSID="clsid:ClassIDForAAA" codebase="<%="YourIPWhereAAACAB is saved" & AAA.CAB#version=2,0,0,0%>">
<PARAM NAME="Enabled" VALUE=1>
</object>
----------------------------
the reason to put <object> here is the AAA.exe I created needs some dependency dlls which may not exists in the client computer. by putting an CAB there it will automatically download the cab and register those dependancies in the client computer so that my .exe can run smoothly.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|