Restrict USMT from capturing unwanted files.

Few days back we were trying replace scenario with one of our clients. The replace TS consisted of an image of Windows 7 Enterprise SP1 which was captured with remote desktop shortcut removed from accessories folder.
The captured image was working fine with the Baremetal scenario & remote desktop connection.lnk was not present in the Accessories folder after the deployment of the image.
But when we tried the same image with the Replace scenario we got a remote desktop connection.lnk file with two other folders named “Communication” & “Entertainment” in accessories.
It was bit shocking for us at first as the same image was used in Baremetal machines and every single thing was working fine.
So, we thought of diving deep into the issue, after our initial research we found out that the folders and the shortcut file in the accessories folder where created after the Restore user state phase in the SCCM Replace TS.As till the time when SCCM client gets installed there was no remote desktop connection.lnk file in the accessories folder. (We found out this by Pressing F8 and enabling the command prompt while SCCM deploys the TS)
After the execution of the Restore user state step it appeared there, this leads us to the point that this was captured from Windows XP machine. Now, there was a need to stop USMT from capturing Remote desktop connection.lnk from Windows XP machine.
So the way to stop USMT from capturing this file is to exclude the file from MIGUSER.XML .
 MIGUSER.XML is the file which USMT uses to capture various data related to users.
So we added command to exclude the shortcut file and the command was this:-


This command should be added in the shared start menu files as this is for all users.
The Exclude Tag used in the script is for excluding the statement present inside the tag.
%CSIDL_common_startmenu% is the CSIDL path for start menu for all users in Windows XP machine.
By the addition of this command we are making USMT to exclude Remote desktop connection.lnk file (if any) from all user start menu of the Windows XP machine.

If you don’t want USMT to capture all .lnk file from all user start menu:-
<pattern type =”File”>%CSIDL_COMMON_STARTMENU%\* [*.lnk] </pattern>

Important Links:-



No comments:

Post a Comment