Wrox Programmer Forums
|
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
 
Old November 16th, 2004, 03:18 AM
Authorized User
 
Join Date: Sep 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
 
Old November 16th, 2004, 03:51 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

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
 
Old November 16th, 2004, 05:27 AM
Authorized User
 
Join Date: Sep 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
 
Old November 16th, 2004, 05:35 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

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

 
Old November 16th, 2004, 05:45 AM
Authorized User
 
Join Date: Sep 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi Chris

should I write like this
 Set objShell = CreateObject("WScript.Shell")
 objShell.Run "xyz.exe",true


rekha
 
Old November 16th, 2004, 05:50 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 683
Thanks: 0
Thanked 1 Time in 1 Post
Default

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

 
Old November 16th, 2004, 05:51 AM
Authorized User
 
Join Date: Sep 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,

Thanks Chris.


rekha





Similar Threads
Thread Thread Starter Forum Replies Last Post
Execute .exe file and terminate it courseware Classic ASP Basics 0 November 9th, 2005 02:49 PM
To execute an exe file from an asp page. sree_mig Classic ASP Basics 0 October 18th, 2005 04:43 AM
Execute .exe file and terminate it Wayang_Mbeling Classic ASP Basics 9 October 18th, 2005 02:42 AM
execute an .exe file in my server from an ASP page sree_mig ASP.NET 1.0 and 1.1 Basics 0 October 14th, 2005 05:42 AM
How can I execute .exe file from asp.net page suri_thanda ASP.NET 1.0 and 1.1 Professional 4 May 10th, 2005 01:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.