?
Solved

Getting Back 'SHELL' Results after calling

Posted on 1998-09-08
2
Medium Priority
?
152 Views
Last Modified: 2010-04-30
Is there a way to get back the output of an executed program that is run by VB's SHELL funciton?  I could easily make the executed program store its results into an output file ie. "> output.txt" and just read in this file but i was hoping that the shell function would return back these results that were displayed on the stdout (the screen).  

The shelled program is a dos running program that just displays text on screen.
0
Comment
Question by:aniston
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
fulscher earned 20 total points
ID: 1433665
You can't. Your only option (with NT) would be to open a pipe and run your command sending the output to this pipe. This won't work generally though; redirected console output of MS-DOS apps is saved in a temporaray file and sent to the next program in the chain by using input redirection.

Shell returns a handle on the calling program. You can just check whether the program is still running but you can't get the output.
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1433666
If you don't have the "Close on Exit" option set on your programs properties page the DOS  window will remain open until you click on the [X] even though the program itself has stopped running. This allows you to read the screen prior to closeout.

M

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month12 days, 2 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question