einarbrown
asked on
Robocopy shows a command window in .bat
There is a command window flickering when I run this code. When I only run Robocopy, no window is showing??? It seems like it is when I run as another user that the window appers. How do I get ridd of that, so the program is completely silent/hidden? (the .bat-file itself is hidden by using hstart from a vbs-file)
if exist "%path%" (runas /user:%user% "%path%\Robocopy.exe %path% "%ProgramFiles%\folder" /MIR /E /W:0 /R:2 /XD *Script* > "%ProgramFiles%\DOM_Mallar \cp_mallar .txt"" | %path%\sanur %pwd%)
Thanks!
if exist "%path%" (runas /user:%user% "%path%\Robocopy.exe %path% "%ProgramFiles%\folder" /MIR /E /W:0 /R:2 /XD *Script* > "%ProgramFiles%\DOM_Mallar
Thanks!
if exist "%path%" (runas /user:%user% "%path%\Robocopy.exe %path% "%ProgramFiles%\folder" /MIR /E /W:0 /R:2 /XD *Script* > "%ProgramFiles%\DOM_Mallar\cp_mallar.txt"" | %path%\sanur %pwd%)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks allot!
ASKER
But now I have solwed it, or how ever made a work around:
First I have a vb-script file that starts a exe-file a have med myself in c#. I run the exe-file (a console app) with hstart to hide the console window.
In the c# code I run robocopy, and again I do it using the utility hstart.
Puh....
Open in new window