|
-
Mar 2nd, 2004, 09:37 PM
#1
Thread Starter
New Member
Command line and VB 6
Hello,
How do you run command line utilities within your VB program without
having to actually launch command.com or cmd.exe and then store the
result of the command that you ran in a string?
For example you can go to your command prompt and run ipconfig and
it will display your network info. What would be the VB code to run
it within your program without the user having to see the MS-DOS
window and store the results in a string?
Also, I know how to do it by writing the command line results to txt file but I remember there was a way without doing that.
Thanks in advance
-
Mar 2nd, 2004, 09:44 PM
#2
It would be
shell "cmd /k netstat -n>c:\text1.txt",vbhide
-
Mar 2nd, 2004, 09:50 PM
#3
Thread Starter
New Member
Originally posted by Jmacp
It would be
shell "cmd /k netstat -n>c:\text1.txt",vbhide
Thanks for the reply
However I knew that method.
I am trying to do it without having to write any info to TXT file.
I want the program to run the cmd utility and store the info directly in a string..
Like I said, I ve done it before so I know its possible but I have lost the code (stupid me) so I dont remember how I did it now.
Here is the program that utilizes that code:
http://www.webzila.com/utilities/iplookup
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|