Skip to main content

TI2013 6514 Pre Commands Broken?

Thread needs solution

I just updated from build 5551 to 6514. Now the pre-command I was successfully using fails. When I test it, a dialog immediately says, "Execution of the user command has failed." I've tried a number of different things.... reverse and forward slashes, quotes and no quotes, calling a batch file instead of an .exe + argument, and performing a repair install - nothing has worked.

Can anyone help? The original and previously working pre-command dialog (in jpeg format) attached.

Attachment Size
ti2013_command.jpg 54.81 KB
0 Users found this helpful

Greetings,
In some cases, the contents of populated fields do not always translate or migrate properly during upgrade. This is not only true for ATI, but other software I have used where something that is working gets broken after upgrade. Spacing is usually the culprit.

Have you tried, deleting and retyping the path and/or commands manually, saving and then testing? By manually I mean without ANY copy and paste.

Maybe you have done this, but it wasn't clear from your post.

I would also recommend testing the path/commands from a command line and confirm if they can be successfully executed there.

Hi

I have exactly the same problem but with post-commands. I have used the same post-commands for many years and never had this problem. The previous build was working under Windows 8 with no issues.

I have rebuilt the commands from scratch and still no joy. A shortcut with exactly the same commands works flawlessly.

I think it maybe to do with True Image not have the same permissions as I do as the current user but I cannot work out how to put it right.

@johnIsca,

You might be able to confirm this by running the commands from a command line... if it fails, then try running from an elevated command prompt. This can probably be done with some scripting. Power shell maybe???

-verb runas (sadly I am not a power shell guru)

Or, how about telling ATI to run the shortcut (batch file) you have verified that runs with elevated access. Using the "...." button

I don't use this feature myself so this is more of a stab.

shadowsports said:
>> Have you tried, deleting and retyping the path and/or commands manually, saving and then testing? By manually I mean without ANY copy and paste.

Yes. I also used the Edit Command dialog Command browser (the button with the "...") to create the path.

I think there is something more to this as I get the error even when testing (through the TI2013 Edit Command dialog) a .bat that does nothing more than "sleep 2".

Can you successfully run a pre or post command from TI2013 build 6514?

I got a .bat file to work by putting only the name of the file (Test.bat) on the Command line and putting the path to the .bat file on the Working Directory line (C:\Temp Test). The same thing failed if I put quotes around the path. Notice there is space in the path.

When adding Pre/post Commands to TI, I have found that it is best to use the browse feature within that command and actual browse to the file to be used and let the program create is own commands.

Also, I have found that putting the commands into a command or bat file works better than just entereing the same commands into the Pre/post command line.

With help from this forum, I fixed my problem. A modified and working command dialog is attached.

It would seem an argument in B6514 cannot contain a space. I would guess the double quotes are being stripped.

It turns out that my initial debug/testing was not solid either - the "sleep" command will work in a .bat file when called from the Cygwin Bash Shell, but it errors out when called by the Windows 7 command shell (cmd.exe) or TI2013.

Thanks All!

Attachment Size
129401-107347.jpg 54.07 KB

If interested, this is the llink that Colin referenced where a pre/post command is used.
http://forum.acronis.com/sites/default/files/forum/2009/11/5940/keep_wi…

How strange, my post has disappeared!

I also am having problems with a pre-command that stopped working after I installed True Image 2013 build 6514.

My OS is windows 8 Pro.

The final command string in the pre command window is: "C:/Windows/System32/cmd.exe" /c "dir I:\ & ping 127.0.0.1 -n 15". The command is intended to wake a sleeping hard drive before starting a backup. The setup details are in the attached pre_command.jpg file.

The command worked fine at 5 AM when my backup ran, but later the same morning when I updated to build 6514 and tested the install, the pre-command failed. I tried every conceivable variation of command structure, with and without quotes, changing spaces, removing arguments, changing from forward to back slashes, etc., but nothing worked. The only pre-command variation that would work was cmd.exe /c. This simply opens and closes a command window. The setup details for this command string is in the Pre-command2.jpg.

Any insights as to what might be happening or how to implement my original pre-command in True Image build 6514?

Attachment Size
129466-107353.jpg 34.98 KB
129466-107356.jpg 32.07 KB

Hi Win,

I got this to work by making an .exe file instead of a bat file. I'll send you a PM with the download link. The download will contain the source code so you can see what's in the file.

Usually, putting the details of the command into a separate command file or batch file is best. Then list the name and full path to the new file inside the pre/post command line. In other words, all Acronis is doing is executing the command file--not the actual commands.

Post #8 contains examples.

I have the same issue with my pre command bat file that was working fine in B5551. I've deleted the command and readded it back in the settings. Please see the attached pdf file. I get the same error copying the file to the root C:/ and editing the settings. Any ideas?

Attachment Size
132503-108031.pdf 55.22 KB

Try saving the bat file from an elevated prompt.
Right Cick on Notepad.exe
Choose "Run as administrator"
and open and save the bat file again under the elevated prompt.

For temporary troubleshooting, If that does not solve the issue, then put a tempoprary pause inside the batch file after the first taskill line so you can see the error message.

Let us know.

PS;
extract from post #6 above but I believe you are already doing this.
"When adding Pre/post Commands to TI, I have found that it is best to use the browse feature within that command and actual browse to the file to be used and let the program create is own commands."

PS: If still not resolved, you could right click on the bat file and change the security settings in Explorer so that all users listed has full and complete control checked.

Another option to try would be save the file as a "CMD" file rather than a "BAT" file--also using an eleveated prompt and update the pre/post command to the new name.\

Final PS: 6514 will successfully execute the test run of your contents for me.
I left Notepad open on the desktop and added Notepad as the first file in the taskkill

taskkill /f /IM Notepad.exe
pause

The test run from within TI indicated that the notepad was killed
and all other files to be killed were listed as not killed as they do not exist on my system.
TI indicated the test was sucessful--which it was as the bat file opened and closed .
This test ran on Win7-64 laptop.

EricNH

In build 6514 True Image now checks correctly for an error level greater than zero to signify the command failed. This was broken in 5551, and because of this all bat/cmd files showed as successful.

The blank window during your test is normal (the command is running while this window is open) if running a .bat file, the output of a .cmd file IS displayed.

DO NOT PUT A PAUSE in your .bat file except for use in testing only in Windows, as the PAUSE command will lock the blank window when testing in True Image with the "Test Command" button, and you will have to close the Window manually.

The PAUSE command works okay in .cmd files.

Your .bat/.cmd file sets an errorlevel greater than 0 at exit, so it will fail (as it should have in build 5551 also, but didn't).

You can easily correct the exit errorlevel in your bat file to reflect an exit errorlevel equal to 0.

On the last line of your bat file, enter the following:

exit /b 0

(The 0 is a zero)

Also you should be using .cmd files if running Windows 7 or 8. Just rename your .bat file to .cmd.

James

Apparently, True Image 2013 build 6514 still has some issues with the pre/post command implementation.

Testing the difference between .bat and .cmd files in the pre command window using the "Test Command" function shows some inconsistencies between the .bat and .cmd file interpretation.

When using a .bat command the exit errorlevel is interpreted correctly, but with a .cmd file, it is not.

For example, using the .bat file referenced in the previous post, when using the .cmd extension instead of .bat the pre command completes successfully, but fails with the same commands when using the .bat file extension unless an exit errorlevel is set to 0 (zero).

Testing was done on Windows 8 64 bit.

Thanks to all who posted their tips. I changed my BAT file to a .CMD file and now both ECHO and PAUSE work exactly as the DOS reference say they will. I did not have to put the filename in quotes, but did use the ATI 'edit ...' option to select the file to run.