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
|