Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. VB6 - Open the DOS window

VB6 - Open the DOS window

Scheduled Pinned Locked Moved Visual Basic
question
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    xfitr2
    wrote on last edited by
    #1

    How do I open the Dos window and run a batch file within a VB6 application. I have found code that runs batch files, but it does not show the Dos prompt. I need to somehow in VB6 open the Dos console and run a batch file where they have a chance to enter a password for sftp. Anyone have any ideas? I am using OpenSSH sftp and so far have built a batch file they have to access from their desktop and enter a password and run a whole bunch of other commands. It is very confusing to them because they do not have much computer experience. -Garrett

    V 1 Reply Last reply
    0
    • X xfitr2

      How do I open the Dos window and run a batch file within a VB6 application. I have found code that runs batch files, but it does not show the Dos prompt. I need to somehow in VB6 open the Dos console and run a batch file where they have a chance to enter a password for sftp. Anyone have any ideas? I am using OpenSSH sftp and so far have built a batch file they have to access from their desktop and enter a password and run a whole bunch of other commands. It is very confusing to them because they do not have much computer experience. -Garrett

      V Offline
      V Offline
      VBGuruWantabe
      wrote on last edited by
      #2

      Ask for the "Username" and "Password" in your VB program. You would shell your BAT file with the Username and Password as command arguments. In the BAT file run the DOS program and pipe the command arguments (%1 and %2) to the console to supply the signon. It's been way too long since I did a batch file so I have forgotten the syntax, just remember you can do it. If you can use HTTPS, you can do it all from within VB using the Inet OCX control in VB 6 Pro. If "to err is human", programmers must be superhuman...

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups