The Deployment Bunny

OS Deployment, Virtualization, Microsoft based Infrastructure…


  • Archives

  • Meta

Inside the Task Sequence – Generate Application Migration File

Posted by Mikael Nystrom on March 3, 2016

Today during class we worked on Refresh and Replace scenarios. We touched based on a tiny step in the Task Sequence that is actually really cool. In the Task Sequence for Lite Touch (MDT Standalone) there is one step that does not exist in Zero Touch and that is the “Generate Application Migration File” step.

That little step will do a really smart thing, it will basically make sure that registered file types that can be open with an application will automatically be saved by USMT. It does that by grabbing all non-default file types and then check if there is a corresponding application that can open the file by examining the registry.

The “Generate Application Migration File” step.

So, what’s cool about that step?

If you open the file it states:

‘ // Purpose:   Generate an XML file for automatically capturing user data
‘ //            (documents) associated with installed applications.

And if you continue looking in the file you will see the flow, like this:

‘ Determine the version of USMT to use

‘ Create the file and write the standard header

‘ Get the list of all registry keys in HKCR

‘ Look at all file extensions to see if they map to an application

‘ Read the default value to see what app is associated with this extension

‘ See if the file can be opened (has a shell\open\command handler)

‘ Add it to the XML file

‘ Write the rest of the XML file

‘ Make sure the ZTIUserState.wsf script knows to use this script

‘ Cleanup and Exit

So, that is why you don’t need to spend a whole lot of time on USMT when doing Lite Touch.

Try It out

If you would like to see what it actually collects, you can run this interactive, that way it will generate a XML file. If you open it up you will then see what it would have migrated and not.

Open an elevated Command Prompt and execute the following:

cscript \\MDTSERVER\MDTSHARE\Scripts\ZTIAppXmlGen.wsf /capture

You will get an output that looks like this:


If you then open the XML (It is going to be located in C:\MININT\SMSOSD\OSDLOGS and named ZTIAppXmlGen.xml its going to look something like this



6 Responses to “Inside the Task Sequence – Generate Application Migration File”

  1. weixing said

    You modify the default file (ZTIAppXmlGen.wsf )in mdt ,is this ok?can I use directly migapp.xml in usmt5 ,then copy migapp.xml to \\MDTSERVER\MDTSHARE\Scripts\, next modify the file name is ZTIAppXmlGen.wsf,is this ok?thanks ,I hope you can reply to me。

    • ZTIAppXmlGen.wsf is something you don’t touch, if you need your own migration rules, you should create your own XML files.

      • weixing said

        ZTIAppXmlGen.wsf is something you don’t touch,Why are not the same of your content files(ztiappxmlgen.wsf) and the content files(ztiappxmlgen.wsf)inside mdt.
        inside mdt conten files is:


        default ztiappxmlgen.xml migrate data is What effect?

  2. ZTIAppXmlGen.wsf is a script that generates the ztiappxmlgen.xml and add that file to the list that should be used for migration. The basic idea is to add known file extension and migrate that data, that is what I describe in the blog post. If you need to add items manually (files, registry values) you should create your own XML files. The ZTIAppXmlGen.wsf is not supported to change and there is basically no reason to do so either. I recommend you to look basic understanding on how USMT works,

  3. Does this feature have a place in a Windows 7 deployment, or is this for Windows 10?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: