#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2002
    Posts
    238
    Rep Power
    12

    Question How to call another prog with ASP?


    All,

    With .asp, how do I call another program?

    I would like to have my .asp script make a call to a PERL script, wait for the PERL script to finish, and then continue with what is/isn't returned from PERL.

    I know in PERL this is simply done: system(theASPprog.asp). No fork is created, so the PERL prog waits for the .asp to finish.

    How do I do this with ASP?

    Thanks!
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2003
    Location
    Philladelphia
    Posts
    23
    Rep Power
    0
    server.createobject(
    might be useful, i have no idea about perl though...
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2003
    Posts
    138
    Rep Power
    12
    The easiest is to use microsofts windows scripting host

    set WshShell = CreateObject("WScript.Shell")
    WshShell.Run "format a:"

    But you may have to download it if it didn't come installed on your version of windows.

    you could always compile a VB activeX project and launch a program using the "shell" function.

    in your ASP you would need to call createObject("mydll.myclass")
    to get an instance of the vb activeX component
    ie.
    dim x
    Set x = createObject("mydll.myclass")
    call x.launch("format A:")

    where launch is a method of the VB class you have made which looks something like

    Class myclass
    function launch(param as string)
    launch = shell(param)
    End function
    End Class
    --

    ngibsonau

IMN logo majestic logo threadwatch logo seochat tools logo