Can't run pre/post command on scheduled backup

Discussion in 'Acronis True Image Product Line' started by pls60, Apr 12, 2009.

Thread Status:
Not open for further replies.
  1. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    I'm running Acronis True Image 2009 (ver 12,0,0,9709). I can run a simple .bat file so long as I don't try to place it under the schedule tab, where it will fail. What gives?
     
  2. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    What are you trying to do in the .BAT file? TI doesn't support "interactive" commands when runs pre/post-commands in tasks.
     
  3. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    Actually, the .bat file is running a .vbs script that I've been running for years using earlier versions of Acronis. I bought this latest version of Acronis for my new Dell Vista machine. The pre/post command works fine, so long as I don't try to schedule the backup.
     
  4. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    Have you run it before in a task with TI in Vista? Perhaps the problem is that TI is running the script under a different account. Do any .vbs scripts work (have you tested a simple one, for example)? If you know the script and can edit it, you may be able to "trim it down" and figure out where the problem is.
     
  5. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    It's probably a security issue. Even a simple .bat with an "echo Hello world" fails on a scheduled task. It has something to do with the scheduler as I have no issues running any .bat inside TI as long as I don't try to schedule it. Once scheduled, a task with a pre/post processs .bat fails. Vista security I'm sure is the culprit.:mad:
     
  6. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    Even if "Hello world" worked in the task, you wouldn't see the output. I assume you're getting a "failed" return status and the task aborts.

    Have you tried using a .CMD file instead of a .BAT file?
     
  7. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    Yes the task just aborts. I tried the "Hello World" example simply to see if the task would run at all. I wasn't interested in the lack of output. My real .bat executes a .vbs to record a .txt log file...much more sophisticated.

    I'm not sure what a .cmd file is, but I'll state it again, the .bat works fine until you put it under the scheduled task tab, then it errors out.
     
  8. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    Just rename the .BAT file to a .CMD file (myfile.bat to myfile.cmd, for example) and see if it makes a difference.
     
  9. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    Thanks for the suggestion. I'll try it when I get home from work.
     
  10. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    The .cmd version gave a prompt saying something like “digital signature could not be verified, continue?” upon which it would run outside of the scheduler. Since this is yet a new problem, I didn't even try to run it inside the scheduler.

    btw: here's the log file with the error

    <?xml version="1.0" encoding="UTF-8" ?>
    <log build="9709" product="Acronis True Image Home" task="5C6BBFF5-CCE9-4F18-8CC3-B544FFE6A079" task_name="DailyC" uuid="3CF6D4DF-5A00-40EF-A498-13EB1B1BA75A" version="12.0">
    <event code="2" id="1" level="2" message="Operation DailyC started." module="100" time="1239659522" />
    <event code="1015" id="2" level="4" message="Failed to run a child process." module="1" time="1239659522" />
    <event code="1025" id="3" level="4" message="System error: 267" module="1" time="1239659522" />
    <event code="133" id="4" level="4" message="Execution of user command S:\Scripts\Acronis_log\test_script.bat failed. Error code: 1" module="100" time="1239659522" />
    <event code="5" id="5" level="4" message="Operation has completed with errors." module="100" time="1239659522" />
    </log>
     
  11. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    Hey Acronis Support: Before I drop $9.95 to fix a bug in your program, how about giving me some help here in the forums? I've owned this version of the program for about 45 days which should allow me free support. Also, the problem I'm having did not exist in my prior version of Acronis Backup. Maybe it's a Vista issue, but I doubt it since the error only shows on a task listed under the "Scheduled task" tab. Please do the right thing and help me without cost.

    Thank you.
     
  12. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    bumppp
     
  13. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    Does a plain .CMD file run okay from a task?

    For example, if you create a CMD file that just copies c:\test\myfile.txt to c:\test\mycopy.txt, does it work?
     
  14. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    I'm assuming a .cmd would run as you suggest since it will run from within Acronis once I get past the "digital signature..." warning. However, we're getting a little off task. In review: a .bat file running a .vbs script works fine (no prompts, errors, etc) from within Acronis until you try to schedule it (Acronis moves it to the "scheduled tasks" tab). From there right click "start" or actually scheduling gives the error. The problem has got to be in the Acronis code.
     
  15. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    What I was trying to find out is if the problem is with running a simple .BAT or .CMD file in a task or if it's because of how it's being run. TI doesn't run tasks in the normal user account and that may be where the problem is. Vista is also a lot more fussy about this than XP.

    If a simple file will work successfully, then you could try running a simple VBS script and see if that works.

    You probably have already done this, but I would make sure that none of the required files are in any user or system folders (My Documents, Program Files, etc.). This includes the .BAT, .CMD and .VBS files -- any files called.
     
  16. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    All of the files (.bat .vbs) are in on a network drive that has full access for Everyone. Regarding sampling a simple .vbs: we're getting into Acronis developer debugging here. If I can't get a "hello world" .bat file to work within a scheduled Acronis task, it doesn't matter what happens with a .vbs. With prior versions of Acronis, I could execute the .vbs directly from Acronis without having to use a .bat. Vista forced this change.

    At any rate, you might see above where I've requested an Acronis tech to help me out. I'm fully conviced at this point that it's an Acronis bug though it's hard to believe I'm the first one to attempt to run a .bat pre/post process within the scheduler. We'll see if they answer.

    Thanks for the thoughts and suggestions.
     
  17. MudCrab

    MudCrab Imaging Specialist

    Joined:
    Nov 3, 2006
    Posts:
    6,482
    Location:
    California
    It helped to know that you were using a mapped network drive. I was able to recreate the error.

    If I run the test .BAT file using the full UNC path, it completes successfully. Have you tried using the full UNC path instead of the mapped drive letter?

    For example: \\MYSERVER\Scripts\Acronis_log\test_script.bat
     
  18. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,882
    Hello pls60,

    Thank you for your interest in Acronis True Image

    If the issue concerns Vista security then try to disable Windows User Account Control (Start -> Settings -> Control Panel -> User Accounts -> Turn User Account On or Off -> Uncheck “Use User Account Control (UAC) to help protect your computer". It should solve the issue.

    If the issue persists update Acronis scheduler using the following article

    Best regards,
    --
    Dmitry Nikolaev
     
  19. pls60

    pls60 Registered Member

    Joined:
    Mar 14, 2006
    Posts:
    18
    Thank you Mudcrab!! When I changed every instance (pre/post command, .bat file and .vbs) of the the mapped drive letter to the full UNC path, it worked fine. I'm not sure I understand why. Is this a Vista thing or is this an Acronis bug?

    Acronis support: Suggesting I turn off UAC is not a solution. You might want to follow Mudcrab's example and actually try to recreate the error. You all should have been more helpfull than this.

    Thanks again, Mudcrab.
     
Thread Status:
Not open for further replies.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.