none
cmd in TS failed RRS feed

  • Question

  • could you please find what I did wrong...

    the batch is running fine on the pc. But when added to ts it fails


    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis


    • Edited by pob579 Wednesday, July 4, 2018 3:54 PM
    Wednesday, July 4, 2018 3:48 PM

Answers

  • Why not add the bat file as an application and run the application in your TS?

    That always is the easiest method for me. Besides, I know little to nothing about adding anything to the
    Imaging section of the TS. If anything, try to move it up and out of the Imaging part and just keep it in the State Restore section.

    • Marked as answer by pob579 Thursday, July 5, 2018 1:57 PM
    Wednesday, July 4, 2018 5:00 PM
  • Hi,

    the command line should be like this

    cmd /c "%SCRIPTROOT%\640tasks\640tasks.bat"


    • Edited by JiteshKumar Thursday, July 5, 2018 3:37 AM
    • Marked as answer by pob579 Thursday, July 5, 2018 1:57 PM
    Thursday, July 5, 2018 3:35 AM

All replies

  • Why not add the bat file as an application and run the application in your TS?

    That always is the easiest method for me. Besides, I know little to nothing about adding anything to the
    Imaging section of the TS. If anything, try to move it up and out of the Imaging part and just keep it in the State Restore section.

    • Marked as answer by pob579 Thursday, July 5, 2018 1:57 PM
    Wednesday, July 4, 2018 5:00 PM
  • Hi,

    the command line should be like this

    cmd /c "%SCRIPTROOT%\640tasks\640tasks.bat"


    • Edited by JiteshKumar Thursday, July 5, 2018 3:37 AM
    • Marked as answer by pob579 Thursday, July 5, 2018 1:57 PM
    Thursday, July 5, 2018 3:35 AM
  • Jitesh, thanks for pointing to mistake (%)...

    Now the deployment finishes without problem.

    But I came to another issue. The scheduled tasks are not imported.

    1. screenshot shows no tasks after deployment in task scheduler:

    2. I copied the folder with the batch and xmls for import from SCRIPTROOT and run it on the deployed pc.

    Running the batch. The tasks are well imported.


    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis

    3. Double-checked TS on MDT it is enabled and the syntax is OK. As mentioned no errors after deployment.

    s

    Should I check the logs?

    BTW, I did try the1ricksters' advice. I had 0 errors but not tasks imported.

    • Edited by pob579 Thursday, July 5, 2018 1:57 PM
    Thursday, July 5, 2018 1:50 PM
  • What is the content of your bat file?
    Thursday, July 5, 2018 4:53 PM
  • the batch is for importing Scheduled Tasks (xml files)

    It run correctly from Admin CMD.

    ********************

    Solved the prob... I added the pause word into the batch and it pointed me to the issue.

    Because the Deployment was successful without indication.

    It was a bit tricky with path for xmls to import.

    Details are not interesting, because it is very custom need and not related to MDT.

    I want to thank again the1 and Jitesh who adviced to missing %.

    I did test correctly bat as the app. And will test it as cmd in TS knowing the issue.


    --- When you hit a wrong note its the next note that makes it good or bad. --- Miles Davis


    • Edited by pob579 Friday, July 6, 2018 3:59 PM
    Thursday, July 5, 2018 5:14 PM