Skip to main content

Multiple Pre-Commands?

Thread needs solution

I would like to run a series of pre-commands before backup.  I have them configured as four separate commands.  But it looks like only the one that is displayed in the Options ---> Advanced dialog will run.  True/False? and thank you!

 

Commands:

taskkill /f /im explorer.exe

explorer.exe

taskkill /f /im iexplore.exe

taskkill /f /im qbw32.exe

0 Users found this helpful

zzwerzy, if you need to run multiple pre-commands then you will need to put these into a batch command file, either .BAT or .CMD as works best for you.  Otherwise as you have noted it will only run the one command from the diaglog.

I've written batch files before, but it's been awhile.  I wrote the following commands in notepad.exe and saved the result as taskkill.bat with ANSI encoding:

c:\windows\system32\taskkill /f /im qbw32.exe
c:\windows\system32\taskkill /f /im iexplore.exe
c:\windows\system32\taskkill /f /im explorer.exe
c:\windows\explorer.exe

Then, having copied the file to C:\Program Files (x86)\Acronis\TrueImageHome, I configured a pre-command to run taskkill.bat with no parameters.  The various tasks are killed, and explorer restarts, but a command line window remains open at the end of execution and the task never completes - as far as TI2017 is concerned.

I'm guessing I've overlooked something very basic here.  Anything stand out as the culprit?  Should there be a "/B" in the parameters?

TIA!

 

Did you put an 'exit' command at the end of the batch file?

Only the commands in my post above.  I tried "exit" previously and no joy, but I'll go back tonight and try it again.  Thank you, SS!

See webpage: Batch script to automatically reload explorer.exe which may give you an alternative outline for your batch command program.