View Full Version : Running DOS Command using VB
02-08-2005, 12:17 PM
I want to run this DOS command line using VB.
mode -u=username -p=password -m=normal
I used to manually run it in DOS Commmand. I want to run this from my VB program but I don't have any clue.
Your help is very appreciate
Thank you in advance.
02-08-2005, 02:19 PM
Use the Shell function.
02-14-2005, 10:55 AM
I am doing it in slightly different way. Since I have a number of commands to be executed, I am writing them to a batch file (temporary batch file ) and am executing it.
But I have a question. Is it possible to see the command window while the batch file is executing ? I wish to see the output returned by executing the command. How is it possible with VB6 ? Please help. I would like to know if the commands have been executed successfully or not.
Your Advice is greatly appreciated.
02-14-2005, 12:13 PM
You'll need to use the Win32 Console (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/mslu/winprog/unicode_layer_console_functions.asp) functions.
Using Win32 API functions from VB (http://www.mentalis.org/vbtutor/dlls2.shtml).
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.