You could spawn it as a separate process with the same arguments you would use on the command line. You can also redirect stdout and stderr and capture it from within your app and display the text in a control. Do you need an example of how to do this?
I've attached a sample robocopy project. I redirect StdOut so I can capture and display it. You can also do the same for StdErr. Note that robocopy (in the command line) rewrites the current line to display percentages. You'll have to decide how to handle this when you display in a textbox.
You cannot write to a control in the main form from a background thread so we use a delegate.
Thank you for the code Jim. I appreciate it. After following your code it still does not want to copy the folders. I posted my code below. Do you see anything that looks wrong?
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim srce As String = "H:\##ISDEPT\Folder Templates\a"
Dim dest As String = "H:\VBTEST\00010"
Dim MyProcess As Process
If Not My.Computer.FileSystem.DirectoryExists(srce) Then
MsgBox("the source folder does not exist")
If Not My.Computer.FileSystem.DirectoryExists(dest) Then
MsgBox("the destination folder does not exist")
MyProcess = New Process
.FileName = "H:\##ISDEPT\Folder Templates\robocopy.exe"
.Arguments = srce & " " & dest & " /e /r:0"
.UseShellExecute = False
.CreateNoWindow = True
.RedirectStandardInput = False
.RedirectStandardOutput = True
.RedirectStandardError = True
MyProcess goes out of scope as soon as the button_click handler exits. You took out some critical code such as the declaration of the delegate, the sub to handle the processing of stdout, etc. What happens when you run the code that I gave you? If it runs as is, then fails when you change something that is an indication that you made the wrong change. I tested the code before I posted it and it worked just fine.
I Developed application in C# with crystal reports and created setup file in third party (Advance) Installer.When i installed my application on client system application is working but ...