ericbailey2 Posted July 12, 2008 Share Posted July 12, 2008 Greetings, I have been working on writing a script to back up the my documents folder using robocopy. I have it working but I was trying to make it less intrusive to the user. I don't want it interrupting workflow just to run a back up. I am almost there, Here is what I started with CODERunWait(@ComSpec & " /k " & "robocopy ""C:\Documents And Settings\" & $currUser & "\My Documents"" H:\ /MIR /E /V /NP /LOG:C:\BackupLogs\" & $currUser & ".txt /R:1 /W:30") It works, it copies great. I wanted to hide the command window so I added @SW_HIDE but this didn't work. After searching a bit I learned that the /k basically keeps the command window open after execution, so I removed it. It works, the only problem now is it flashes the command window up for a split second and then exits. Is it at all possible to hide this completely from the users view? and interaction? Current Script: CODERun(@ComSpec & " /c robocopy ""C:\Documents And Settings\eric.bailey2\My Documents"" H:\ /MIR /E /V /NP /LOG:C:\BackupLogs\Log.txt /R:1 /W:30" ) Thank you in advance! Link to comment Share on other sites More sharing options...
Andreik Posted July 12, 2008 Share Posted July 12, 2008 Try _RunDOS or ShellExecute When the words fail... music speaks. Link to comment Share on other sites More sharing options...
ericbailey2 Posted July 12, 2008 Author Share Posted July 12, 2008 Try _RunDOS or ShellExecuteWow, I got it to work with your advice. I had to play with the syntax a little because I had no idea how to use either, but I got the _RunDos command to execute perfectly, thank you. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now