Closed splendid25 closed 3 years ago
Please post the code of how you are using robosharp, in my experience there is no window created.
Sure here it is :
using (var copyCommand = new RoboCommand())
{
copyCommand.CopyOptions.Source = originalPath;
copyCommand.CopyOptions.Destination = targetPath;
copyCommand.CopyOptions.CopySubdirectories = true;
copyCommand.RetryOptions.RetryCount = 1;
copyCommand.RetryOptions.RetryWaitTime = 2;
var task = copyCommand.Start(domain, user, pwd);
task.Wait();
}
It seems the window is displayed on the task.Wait(). I use RoboCopy from a .NET4.0 Winform App. Is there another way to wait synchronously ?
Thanks
I use a very similar set up, and don't see any console window. What does the console window have written in it? have you changed any other settings related to robocopy?
Have you looked at the example on the Readme page?
You can add a wait to that codes starting task and shouldn't see a console window
OK I found details on the issue. If I run this there is no window :
var task = copyCommand.Start();
And with another user running robocopy, a console window appears, with the title 'C:\Windows\system32\Robocopy.exe' :
var task = copyCommand.Start(domain, user, pwd);
In my use case, the user running the program won't have permissions to access the folders, so I need to run Robocopy as another user.
Hi, when start from a WinForms app, Robocopy.exe is display in a normal window on top of the current form. Is is possible to start Robocopy.exe minimized ?