Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Running DOS Command using VB

    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.

  • #2
    Regular Coder
    Join Date
    Dec 2003
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use the Shell function.

    shmoove

  • #3
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #4
    Regular Coder
    Join Date
    Dec 2003
    Posts
    367
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You'll need to use the Win32 Console functions.

    Using Win32 API functions from VB.

    shmoove


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •