Does batch file wait for command to finish?
Does batch file wait for command to finish?
You don't need the /wait in the second line unless there are more commands to follow. … Since runas is an executable and the batch waits until it is finished it's possible you can let away the start command all together. If all this doesn't work insert 5 ping commands, that is the classic way to wait for ± one second.
What is the sleep command in Windows?
Sleep command Windows provides a resource kit tool 'sleep' which can be used in batch files or command prompt to pause the execution and wait for some time.
How do I keep a batch file open?
Depending on how you are running the command, you can put /k after cmd to keep the window open. Put pause at the end of your . BAT file. Just add @pause at the end.