Try to deploy bat script in MDT Task sequence but fail with popup error "dirty environment found"

Ahmed Talaat 1 Reputation point
2021-02-03T13:38:33.673+00:00

hi

Try to deploy bat script in MDT Task sequence but fail with popup error "dirty environment found"

where to put script in standard task sequence to avoid "dirty environment found"
message

I putted in State Restore ==> Custom Task folder

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).
840 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Ahmed Talaat 1 Reputation point
    2021-02-03T13:44:34.837+00:00

    63533-esetagent-script.jpg

    0 comments No comments

  2. Simon Ren-MSFT 30,831 Reputation points Microsoft Vendor
    2021-02-04T09:21:50.1+00:00

    Hi,

    Thanks for posting in Microsoft MECM Q&A forum.

    Based on my experience, you have put the batch script in a location that doesn't match in you command line. Put the batch script in the Scripts folder of your deployment share; the location will be %SCRIPTROOT% and you'll run something like cmd.exe /c %SCRIPTROOT%\Updates.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\Updates.bat, for example, where Custom is a folder you've created in the deployment share.

    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.