VB6 - Open the DOS window
-
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
-
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
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...