Solved

DOS prompt window to textbox.

Posted on 2004-09-21
3
834 Views
Last Modified: 2008-01-09
I want to wrap a GUI around Robocopy, but I want it pretty. How do I redirect the output generated by this "DOS" command into a text box or some other control on a VB6 form?
0
Comment
Question by:DrDamnit
3 Comments
 
LVL 15

Accepted Solution

by:
unknown_routine earned 500 total points
ID: 12117031
Hi,
Look Here
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q173/0/85.ASP&NoWebContent=1


Make the sample project
however you need  to change the code inside the command button click to:(aasuming you use 2000 or XP)




ExecCmd ("C:\winnt\system32\cmd.exe /c path")

Note that change the inner string as you want . in your case it is path to that exe file

probably ExecCmd ("C:\Robocopy.exe")  ( use real path to robocopy)

Note 2: the sample code uses  a listbox for the output dont forget to change it to a text box.


Regrads.





0
 

Expert Comment

by:smiling_ace
ID: 12119336
do you mean you would do commands on cmd.exe and display the output on textbox in visual basic?
0
 
LVL 32

Author Comment

by:DrDamnit
ID: 12119991
Thanks!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 61
using Access 8 83
Saving history changes to sub form 4 51
How to set the sa password in a vb6 code for sql connection 9 62
I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question