Solved

DOS prompt window to textbox.

Posted on 2004-09-21
3
830 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
z = x + y – 1 6 54
DO Loop not working 4 62
Computer crashes, following error message in event manager 5 75
VBA filters 2 37
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now