Skip to main content

Pre / Post Commands Not Working

Thread needs solution

We just got TI 2015 after trialing it and it working fine. Then we moved the destination drive from an internal hard drive, shared in our network, to an external one, shared as well. Here's the curious part. The pre/post commands no longer work on all machines. They're the same commands, and on some machines they work fine and on others they fail. The commands in the Pre / Post commands are simply intended to mount and dismount the destination media drive. Pre mounts it. Post dismounts it, so that it is only online to a user during the actual backup process.

Here's the Pre command:
NET USE Q: "\\REPLICA\D" /P:NO

Here's the Post one:
MOUNTVOL Q: /D

They test just fine when setting them up in the Acronis advanced settings Pre/Post commands. When running the backup, though, it gets:
Execution of user command F:/Support/Acronis Backup Scripts/Mount Acronis Backup Drive.bat failed. Error code: 1

As I mentioned, we did these same commands before on the internal shared drive without an problem. As soon as we switched to the external one, which shouldn't make any difference, we started getting these errors after changing the script to point to it. However, some machines run them fine. It doesn't appear to be a permissions issue either, because the machine that runs fine is a low privilege one and the ones having problem are in administrator mode. Anyone have any ideas?

0 Users found this helpful

Over the years, this option has never worked consistently when the command was a direct use command.

Try putting the commands into a bat or cmd file. You should create the files in notepad when notepad is opened in "Run as Administrator" mode.

GroverH wrote:

Over the years, this option has never worked consistently when the command was a direct use command.

Try putting the commands into a bat or cmd file. You should create the files in notepad when notepad is opened in "Run as Administrator" mode.

I probably was unclear. They're in a .BAT file today, and Acronis points to the BAT files. I wasn't specifying the commands inside Acronis (in fact, I didn't even know you could do that). I was just showing you the commands that the BAT file contained. Any other ideas?

I just tried putting the Pre & Post commands on the C drive instead of the shared network drive and for now it's working. The command on the C drive just points to the one on the shared drive, since we'll be doing this for many Acronis users and don't want to have to change the actual command in more than one place, but for some reason pointing Acronis to the network share for its command was causing it to fail. Does any of this make sense?

As for changes, storing the pre command inside the share could be a timing or lack of access issue--but that is just a guess on my part.

Two other things, you might consider.
1. Save the bat file as a CMD file instead but still be sure that the NOTEPAD was started in the eleveated "Run as Administrator" mode.
2. Save the file (CMD or BAT) in the Acornis program folder where its other exe files are stored.

All of this is strictly a "trial and error" type situation as there is no published instructions and I am just going on what has failed in the past.