Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C++ and Visual C++ > C++ Programming
|
C++ Programming General discussions for the C++ language. For questions specific to Microsoft's Visual C++ variant, see the Visual C++ forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C++ Programming 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
  #1 (permalink)  
Old July 2nd, 2007, 08:53 AM
Registered User
 
Join Date: Jun 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Taking output from cmd commands

Hey there!

I am currently writing a program that searches a network for a specific piece of software and then checks a version file inside to see which version of the software is installed. I regularly run this program over a network with 300+ computers. When the computer I am checking is connected to the network, I get results back immediately; however, when I attempt to search a computer that is not connected, turned off or does not have the proper file folders required, it can take anywhere from 5-10 minutes per machine. I have considered pinging each machine and checking for any data loss, but I do not know how to literally draw that information from the command window to my program, it just outputs it to the screen but not for variable use. Would someone be kind enough to share a snippet of functional code that can take the output from a console window for use in the program that is running it? Thanks!


- Codefishy
Reply With Quote
  #2 (permalink)  
Old July 2nd, 2007, 01:44 PM
Registered User
 
Join Date: Jun 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Oop I figured it out ^_^

Apparently the command outputs a 1 or 0 for pass fail and you can retrieve it simply by using

cout << "command"

^_^

- Codefishy
Reply With Quote





Similar Threads
Thread Thread Starter Forum Replies Last Post
Script taking too long mmltonge Classic ASP Professional 3 April 16th, 2007 06:56 PM
taking particular data .. anukagni Access 2 August 4th, 2006 12:05 AM
probs while taking backup anukagni MySQL 3 April 20th, 2006 03:47 AM
Autofilter taking too much of time raaghu15 Excel VBA 2 March 4th, 2005 05:43 PM
Capturing cmd output Chris Beach C# 0 October 3rd, 2003 04:34 PM





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