Skip to main content

Running tasks via TrueImageLauncher.exe /script is not working

Thread needs solution
Forum Member
Posts: 13
Comments: 15

Hi!

For various reasons I'm using Windows Task Scheduler to run my daily backups instead of built-in Acronis scheduler.

It was working fine using TI 2018 until today when I upgraded to TI 2019.

My script is running TI tasks using the following command:

"C:\Program Files (x86)\Acronis\TrueImageHome\TrueImageLauncher.exe" /script:XXXXX

With TI 2019, this leads to trueimage.exe appearing shortly in task manager but crashing immediately. Next time I run TI, I get a crash report dialogue (which I already filled out and sent of course).

I also tried running it manually from CMD (so no Windows task scheduler involved), both with user-rights and administrative rights. Same problem all the time.

The only working way is: Run True Image GUI first, wait until it loaded completely. Then when in TI backup overview, run the "C:\Program Files (x86)\Acronis\TrueImageHome\TrueImageLauncher.exe" /script:XXX command from CMD. Then the backup is running fine.

Can anyone confirm this issue?

0 Users found this helpful
Legend
Posts: 105
Comments: 25915

Martin, I have not had any problems running tasks via a script file with any of the recent versions of ATI including 2019.

I would recommend first trying a Repair install for ATI 2019 to see if this resolves the issue, and if not, then you should do a clean install of 2019 (after saving your task configuration settings to a zip file via the new Settings option in the GUI).

A Repair install is achieved by reinstalling over the top of the existing software without uninstalling first.

Forum Member
Posts: 13
Comments: 15

I tried the clean installation way, but unfortunately it didn't help.

I have figured out a workaround: I just call "C:\Program Files (x86)\Acronis\TrueImageHome\TrueImageLauncher.exe" (without any /script calls) once at the beginning of my backup batch file (which is run by Windows task scheduler).

That leads to "trueimage.exe" appearing in task manager (but in the background, so I can't see the GUI, because its run by task scheduler in non-interactive mode).

When trueimage.exe is running, the "trueimangelauncher.exe /script:XXX" calls succeed. In the end of my backup batch script, I run "taskkill /IM trueimage.exe /F" to clean everything up.

Kind of nasty workaround, but like this everything is working. I don't know why this is neccessary on my PC but not on yours..

Forum Member
Posts: 13
Comments: 15

....

Forum Hero
Posts: 79
Comments: 7213

I can confirm this issue. (ATI 2018 upgraded to ATI 2019)

Legend
Posts: 105
Comments: 25915

Cross reference to forum topic: Acronis Backup (BU) Using Rotating USB Drives where Martin's workaround is being used - thanks to Martin for finding this!

Regular Poster
Posts: 26
Comments: 116

I started the Acronis Backup (BU) Using Rotating USB Drives thread and got the Pre/Post command path working in ATI 2019 but it has an issue in that when I test for a drive and it is not attached in the BAT I issue "exit /b 1", ATI then sees this as a failure and terminates. However, because it sees it as a failure ATI flags the task as having failed. I don't see this as a "failure" but I don't see any way to get around this. Suggestions???

I'm also testing a batch file that will execute as Martin is testing. The problem I have here is that I need to have the BAT file wait until ATI has completed the BU. So far everything I've tried does not work. Because the amount of time required to complete the BU I cannot use the "timeout /t xxx" command. Currently, in my ATI task I'm backing up a very small folder and I can use "timeout /t 15" and ATI will complete the task and all looks OK.

I've tried other options I've found during my search for a solution but they have not worked. Suggestions???

BTW I've reported the Pre/Post issue to support, so far they claim working as designed and so far I have not been able to convince them that the design is incorrect or the design needs to be enhanced..

Legend
Posts: 105
Comments: 25915

The problem I have here is that I need to have the BAT file wait until ATI has completed the BU. So far everything I've tried does not work. Because the amount of time required to complete the BU I cannot use the "timeout /t xxx" command. Currently, in my ATI task I'm backing up a very small folder and I can use "timeout /t 15" and ATI will complete the task and all looks OK.

John, if your BAT file is being run outside of ATI, then perhaps you need a combination of this along with a pair of Pre/Post Commands along the following lines:

Pre Command -
Echo "ATI working" > ATIworking.txt 

Post Command -
Del ATIworking.txt

Then in your BAT file test for ATIworking.txt and loop until the test fails because it has been deleted.

:repeat
If exist ATIworking.txt goto loop
exit /b 0

:loop
timeout /t 180
goto repeat
Regular Poster
Posts: 26
Comments: 116

Steve, thanks for the suggestions, the BAT file was being executed outside of ATI but I'm not having success.

If I put "Echo "ATI working" > ATIworking.txt" as the Pre-command and click on the "Test command" button it fails. Possible an error on my part, but I gave up on it and created another BAT file (E:\ATI-Working.bat) which is as follows.

echo off
Title BAT file to create 
ATI-Working.txt file, if present then loop
Echo "ATI working" > e:\ATIworking.tx
t
 

As a BAT file when I clicked on the "Test Command" button the text file was created. So I created "E:\ATI-WorkingFinished.bat" which is as follows:

echo off
Title BAT file to delete ATI-Working.txt file, 

Del e:\ATIworking.txt

When I click on the "Test command" button if the file is present it is deleted. So far, excellent.

Then I entered the appropriate text in the Pre/Post command areas (see the images), then I tested.

When the Task Scheduler kicks off and the ATI task runs it does NOT create the text file (but I did test the BAT file and it creates the text file). As a test I ran the BAT file to create the text file and then had the Task Schedule run. Now ATI creates my BU and does execute the BAT file to delete the text file (and it does delete the text file). I'm going in circles on this and cannot see what the heck I did wrong. When I added the Pre/Post commands I used the browse button to find the commands thus ATI put all the test into the command line. Suggestions????

Attachment Size
462204-152661.png 39.47 KB
462204-152663.png 41.03 KB
Legend
Posts: 105
Comments: 25915

John, one alternative thought, move the line  Echo "ATI working" > e:\ATIworking.txt from the Pre Command to the Task Scheduler ATI launch bat file, leaving just the Post Command in place.

If the moved line is prior to launching ATI for the task script and the Post Command works ok to delete the file to show the task has completed, the end result should be the same.

Regular Poster
Posts: 26
Comments: 116

Steve - success or so it seems. Thanks for the simple suggestion. Mentally I got caught in a rut and could not see the forest because the trees were in the way.

Now to implement it on the production system.

BUT I think I see another issue. In the test, I'm creating what I'm calling a full BU but because it is a test it really is just a small folder (in the interest of time) I'm backing up (most of this statement is FYI). In the task setup for the scheme, I've stated that no more than 3 recent versions should be stored (see the image). I repeat the test three times.

  1. after the first test, I see one BU file (i'm kicking off the run via the Task Scheduler)
  2. after the 2nd test, I see two BU files
  3. after the 3rd test, I see three BU files
  4. after the 4th test, I see four BU files > I expected to see only three. In my previous testing at this point, I would see only one BU file but I expected to see three. 
  5. after the 5th test, I see five BU files
  6. after the 6th test, I see six BU files
  7. I changed the number of versions to 4, reset the TS time, it ran and now I see 7 BU files. So far I'm testing with the ODD drive. I changed to the Even drive (I removed the Odd drive), it is set to 3 versions, I see 4 BU files.
  8. I reset the TS time, the Even task ran and now I see only one even BU file (before the task ran I saw 4 BU files).
  9. I removed the Even drive and attached the Odd drive, changed the TS time, (I see 7 BU files), the task ran and now I see 3 BU files (this is what I expected to see)
  10. Again I changed the TS time, the task ran, created the BU file, now I correctly see 3 BU files.
  11. back to the Even drive, changed the TS time, (I see only 1 BU file, I should now be keeping 4 versions), the task ran, I see 2 BU files.
  12. I changed the TS time, the task ran, I see 3 BU files.
  13. Again I changed the TS time, the task ran, I now correctly see 4 BU files
  14. Again I changed the TS time, the task ran, I now see 5 BU files
  15. Again I changed the TS time, the task ran, I now see 6 BU files

I'm confused and lost, I think I found a bug, suggestions? 

FYI the Odd drive is a Toshiba 80GB SATA drive, NTFS formatted, the Even drive is a SanDisk 500GB SSD drive, NTFS formatted. On both, the target path is Drive-Letter:\BU\Acronis\BTCD

 

Attachment Size
462280-152711.png 88.5 KB
Legend
Posts: 105
Comments: 25915

John, one 'feature' of ATI which has been present for some time across different versions is that if you change any of the Backup Scheme / task settings, this has the habit of resetting the version count and causes more backup files than otherwise expected.

Regular Poster
Posts: 26
Comments: 116

Steve, is there a workaround for this 'feature'? Thanks for the FB. 

Using the batch file you originally suggested along with other suggestions/enhancements to the BAT file (this is using the Windows Task Scheduler) I've had it running on my test system and it seems to work without problems. I'm starting to implement it on my son's production PC. Just to be on the safe side I'm also running the task that produces a false failure if the drive is not connected (this uses the Pre/Post Command in the ATI Advanced options). 

I've started to update the document but it now has a long way to go. When you have time please review the file in the dropbox.

Much thanks for your help.

Legend
Posts: 105
Comments: 25915

John, the only workaround is to create your backup tasks and then try to leave them alone, especially the Backup Scheme settings.

Regular Poster
Posts: 26
Comments: 116

the only workaround is to create your backup tasks and then try to leave them alone, especially the Backup Scheme settings.

Bummer - I can see that this might be a difficult issue to resolve. Do you know if it is on the list of bugs that the development team is chasing? 

I've opened several issues with support and find it difficult to impossible to follow along and link the emails from them to the issues I've reported. Any suggestions?

Legend
Posts: 105
Comments: 25915

I am not aware of what bugs are on any development lists or what priority they may have here John.

The only tips I can give for when working a support case is to keep restating the issue in as simple a way as possible, including giving step by step recreation details if relevant.  Certainly challenge the support people if they do not appear to understand what you are reporting or are going off on a tangent etc.  You can also ask for the support case to be escalated to their more senior people if you feel it is getting nowhere or going round in circles!  You can also send a private message to Ekaterina or Renata via these forums if you feel this would help to get their review of things.