Results 1 to 3 of 3

Thread: How do I run (shell) an executable from VB Script?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    103
    How do I run (shell) an executable from VB Script? Source appreciated.

  2. #2
    Addicted Member
    Join Date
    May 2000
    Posts
    142

    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.

  3. #3
    New Member
    Join Date
    Jul 2000
    Location
    AZ
    Posts
    3
    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
  •  



Click Here to Expand Forum to Full Width