tags:

views:

17

answers:

1

I am working on an old ASP web app (not .net) and I need to launch a separate process (exe). After much googling I have yet to find a valid way of doing this. Anyone have any suggestions?

Does CreateProcess work in ASP?

Thanks!

+1  A: 

You'll need to have full control of the server, as this is considered very insecure. It's unlikely a hosting service will allow you to do this.

<script language="VBScript"> 
    Sub Scan 
        Set objShell = CreateObject("Wscript.Shell")

        'objShell.Run "C:\MyApp.exe"
        objshell.Exec "C:\MyApp.exe" 

    End Sub
</script> 

Here is an article that explains the whole process.

Dave Swersky
Thanks! This sort of works! I can run commands like "cmd /c dir" which work fine, but when I try a path to an exe I keep getting an error saying the file cannot be found. Thanks for the help!
Peter D
Nevermind. I got it. Web server was using a networked resource so I was putting the exe file in the wrong location. Not to mention the QA servers are load balanced which I only found out later. Thanks!
Peter D