...

View Full Version : Running DOS Command using VB



vmaruv
02-08-2005, 12:17 PM
Hello ,

I want to run this DOS command line using VB.

set IMODE=c:\tng0~2\bin
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.

shmoove
02-08-2005, 02:19 PM
Use the Shell function.

shmoove

vmaruv
02-14-2005, 10:55 AM
Hi ,

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.

Vidya.

shmoove
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).

shmoove



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum