 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

November 16th, 2004, 03:18 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to Execute and EXE file through ASP
hi,
I have a VC++ EXE file and want to Execute it through ASP.
How it can be done.
Pl help.
:)
rekha
__________________
It is always safe to assume, not that the old way is wrong, but that there may be a better way...
*************************
Rekha
|
|

November 16th, 2004, 03:51 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
|
|
you can do that using WINDOWS Scripting Host object(WSH). Look for its usage from miicrosoft's site or try google search.
Cheers!
_________________________
- Vijay G
Strive for Perfection
|
|

November 16th, 2004, 05:27 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Server.CreateObject("wscript.shell") creates an independent thread where as my requirement is to execute 2 exe one by one (fist exe output is input for the second exe) not both at a time.
Pl help.
rekha
|
|

November 16th, 2004, 05:35 AM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Rekha,
The third parameter of the shells run method decides whether to wait for the program spawned to terminate. Setting this to true should do what you want.
HTH,
Chris
|
|

November 16th, 2004, 05:45 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi Chris
should I write like this
Set objShell = CreateObject("WScript.Shell")
objShell.Run "xyz.exe",true
rekha
|
|

November 16th, 2004, 05:50 AM
|
|
Friend of Wrox
|
|
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
|
|
Hi Rekha,
The second parameter is window style of the program, assuming you don't want to see it, you need...
Code:
objShell.Run "xyz.exe", 0, True
HTH,
Chris
|
|

November 16th, 2004, 05:51 AM
|
|
Authorized User
|
|
Join Date: Sep 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi,
Thanks Chris.
rekha
|
|
 |