faqts : Computers : Programming : Languages : Asp : ASP/VBScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

62 of 81 people (77%) answered Yes
Recently 5 of 10 people (50%) answered Yes


How do I call a VB.exe program from an ASP program?

Oct 10th, 2002 16:22
Randy H, Robin Paardekam, Nate James,

I assume you want to run an executable at the server-side. As you might 
know it's not possible to run exe's client-sided. Here's the code:
Set server_shell = Server.CreateObject("wscript.shell")
server_shell.Run "%comspec% /c FILENAME.EXE"
Good luck!
Robin Paardekam
Sorry Robin. There are ways to run applications on the client side with 
Here's an example that I came up with using the DOS Shell. it only 
opens media player but the command line can be changed to open any 
<Script language=vbscript>
    Dim oShell
Set oShell = CreateObject ("WSCript.shell")
oShell.run  ("cmd /K CD C:\Program Files\Windows Media Player & 
wmplayer & exit"), 2
Set oShell = Nothing
Have Fun,

© 1999-2004 Synop Pty Ltd