Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP 3 Classic ASP Active Server Pages 3.0 > Classic ASP Basics
|
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 December 24th, 2003, 09:16 AM
Registered User
 
Join Date: Dec 2003
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Executing an .EXE with ASP and capturing the echo

Hi Guys.
First I'm new on this forum so 'Hi'ya'.

Anyway I wonder if any of you guys could help me...

I need to execute an .EXE on my server with ASP, I know this can be done (http://www.4guysfromrolla.com/webtech/072199-2.shtml).
But I want to also capture the output the application echoes in the dos box.

Basically this .EXE is a key generator app for a new web service I'm making, so I send the .EXE a serial number and it will send back another set of numbers.


Do you think this could be done?


Cheers.

Jason Etheridge
 
Old December 29th, 2003, 08:06 PM
Authorized User
 
Join Date: Oct 2003
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think I had similar problem before.

For information about how to execute .EXE file you can see this forum, the guy helped me a lot: http://p2p.wrox.com/topic.asp?TOPIC_ID=5624

I believe you cannot do it right away by just using ASP (maybe there is some free ASP application or component for it, i do not know)

However, there is a work around for it. You can make your .EXE to write the result into a text file. Then, you can make a ASP page to read the content of that text file. It is kind of easier for me because my .EXE writes the result to the text file.

hope that help.

« Wayang Mßeling »
÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷÷ ÷÷÷÷÷
ASP Newbie needs guidances here
 
Old January 5th, 2004, 09:50 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post
Default

Take a look at the Windows Scripting Host objects, in particular the WScript.Shell object and its Exec method. When you use the Exec method to run a program, it returns a WshScriptExec object which provides access to stdin and stdout, which you can use to capture the program output and send a reply.

There's an example using command-line ping here: http://www.aspfaq.com/show.asp?id=2033
 
Old October 18th, 2005, 02:48 AM
Registered User
 
Join Date: Oct 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I should call some exe file from the asp page.The anme and location is given below.

exe file is in D:\programs\fabmsgsnd.exe.

when i click the some command button say submit button It should call this exe file and it well open in a command prompt.

can any tell me the script for calling this exe file from the asp page.

Thanks in advance.

R.Sriram





Similar Threads
Thread Thread Starter Forum Replies Last Post
executing DTS through ASP lem SQL Server ASP 1 February 6th, 2007 05:08 PM
haveing difficulty's executing a exe file dex_bg Visual C++ 2 October 18th, 2006 11:58 AM
capturing asp data in clientside javascript Terry Joseph Migliorino Javascript How-To 9 November 2nd, 2005 09:10 AM
capturing asp data in clientside javascript Terry Joseph Migliorino Javascript 1 October 31st, 2005 01:42 PM





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