question

Amirgh-0528 avatar image
0 Votes"
Amirgh-0528 asked SimonRenMSFT-3639 commented

How to run my batch file in task sequnce MDT?

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?

windows-server-powershelloffice-deploymentmem-mdt
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

SimonRenMSFT-3639 avatar image
0 Votes"
SimonRenMSFT-3639 answered SimonRenMSFT-3639 commented

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://docs.microsoft.com/en-us/answers/articles/67444/email-notifications.html

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi,

Hope everything goes well. May we know the current status of the question? If there is any other assistance we can provide, please feel free to let us know, we will do our best to help you.

Best regards,
Simon

0 Votes 0 ·