none
MDT Dynamic Task Sequence Selection based on a file in Windows/System32 RRS feed

  • Question

  • First of all I have very less experience in MDT. While we are creating our OS Image we put a file in Windows/System32, say OS_VersionInfo.txt, for identifying that the image is pushed from MDT or not. Now our requirement is while deploying OS from MDT, PXE Boot from F12, our MDT has to read that file and if exist it should select TS=Upgrade/Refresh else select TS=NewComputer. How to do this using MDT / Is it possible from MDT.

    Any help is more helpful for me. Thanks in advance.<o:p></o:p>


    Thursday, May 16, 2013 9:51 AM

All replies

  • First, yes, you can create criteria based on if a file exists using WMI like this: "Select * From CIM_Datafile Where Name = 'C:\\Windows\\System32\\OS_VersionInfo.txt'".

    Now, there are some complications with what you are trying to do (changing DeploymentType).  See this thread (http://social.technet.microsoft.com/Forums/en-US/mdt/thread/2a428e16-571c-42e3-8f4a-56bb164d3e6d/) for some information about the pitfalls.  There is logic already built into MDT for this.  If you run from LiteTouch.vbs (in Full OS) and don't have SkipDeploymentType=NO in your CustomSettings, than it will be assumed as a REFRESH.  If you run it from PXE, it will be a NEWCOMPUTER.  You can see the code for this in LiteTouch.wsf around line 373-391.  Note that you'll also have some complications with the WMI query if you are in WinPE, since the drive letter is likely to be different.


    David Coulter | http://DCtheGeek.blogspot.com | @DCtheGeek

    Thursday, May 16, 2013 1:33 PM
    Answerer
  • Thanks David,

    I will verify and choose the best.

    Monday, May 20, 2013 10:16 AM