2
- When executed independently, they execute perfectly.
- When executed in 2 consecutive
runas
statements,chrome.exe
is executed beforerobocopy
has had a chance to finish. - When placed inside a single
runas
separated by a&
, it will not execute properly. Why?
runas /savecred /user:chrome "robocopy C:\Users\chrome\AppData\Local\Google\Chrome-Backup C:\Users\chrome\AppData\Local\Google\Chrome /mir & \"!ProgramFiles(x86)!\Google\Chrome\Application\chrome.exe\""
What is
!ProgramFiles(x86)!
? Should that be %ProgramFiles(x86)%? Or is this part of a batch file using delayed expansion? – DavidPostill – 2016-04-03T11:30:08.503What do you mean "it will not execute properly". What does it do? – Wes Larson – 2016-04-08T20:53:19.583