How to run my batch file in task sequnce MDT?

Amir gh 1 Reputation point
2021-08-19T16:40:15.467+00:00

Hello,

I have a batch file that downloads and installs applications ( google chrome, office 365, and adobe reader) from chocolaty.

How can I set this so it run install after deployment?

Microsoft Deployment Toolkit
Microsoft Deployment Toolkit
A collection of Microsoft tools and documentation for automating desktop and server deployment. Previously known as Microsoft Solution Accelerator for Business Desktop Deployment (BDD).
831 questions
Office Management
Office Management
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Management: The act or process of organizing, handling, directing or controlling something.
2,010 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,381 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Simon Ren-MSFT 30,496 Reputation points Microsoft Vendor
    2021-08-20T09:14:26.867+00:00

    Hi,

    Thanks for posting in Microsoft MECM Q&A forum.

    1,Based on my experience, we could try to put the batch script in the Scripts folder of your deployment share; the location will be %SCRIPTROOT% and we'll run something like cmd.exe /c %SCRIPTROOT%\application.bat. If you want to use a different folder in the deployment share, just remember the variable %DEPLOYROOT% points to the root of your share. You could run it from %DEPLOYROOT%\Custom\application.bat, for example, where Custom is a folder you've created in the deployment share.

    2,We could also deploy the .bat file as application in MDT. Refer to:
    ASK MDT Guy: Adding Scripts as Applications to MDT
    Note: This is non-Microsoft link, just for your reference.

    3,We could also add applications to the MDT deployment share before creating your task sequence. Refer to:
    Step 4: Add an application

    Thanks for your time.

    Best regards,
    Simon


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    https://learn.microsoft.com/en-us/answers/articles/67444/email-notifications.html