Solved

DOS prompt window to textbox.

Posted on 2004-09-21
3
831 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
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…

930 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

9 Experts available now in Live!

Get 1:1 Help Now