How can I exclude Start Menu items from being captured and restored using a custom file in USMT 4

when doing a Refresh from Windows 7 to
Windows 7 you may have programs installed on the source computer which
are not installed on the destination even if it’s the same computer, and
as a result you don’t want to migrate those unusable shortcuts in the
start menu,
here’s how you can exclude them and in addition exclude some additional
items like files on the desktop (msi/exe) or desktop shortcuts.

  • create a custom XML file which you will use in addition to the default USMT xml files that are provided with USMT.
  • copy the below content into this blank XML file
  • save the file as WNB.XML
<?xml version="1.0" encoding="UTF-8"?>
<migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/WNB">
   
<!--WNB.xml is basically a customized version of MigUser.xml -->

        <_locDefinition>
        <_locDefault _loc="locNone"></_locDefault>
        <_locTag _loc="locData">displayName</_locTag>
        </_locDefinition>
<!-- This component EXCLUDES the following User specific stuff-->
<component type="Documents" context="user">
<displayName _locID="miguser.User_Exclusions">User Exclusions</displayName>
<role role="Data">
<rules>
<unconditionalExclude>
<objectSet>
<!-- exclude items pinned on the taskbar otherwise it'll cause the same items to show up as (2) desktop-->
<pattern type="File">%APPDATA%\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\* [*.lnk]</pattern>

<!-- exclude blank links on the desktop-->
<pattern type="File">%CSIDL_DESKTOP%\* [*.msi]</pattern>
<pattern type="File">%CSIDL_DESKTOP%\* [*.exe]</pattern>
<pattern type="File">%CSIDL_DESKTOP%\* [*.lnk]</pattern>
<pattern type="File">%CSIDL_DESKTOP%\* [*.lnk2]</pattern>

<pattern type="File">%CSIDL_DESKTOPDIRECTORY%\* [*.msi]</pattern>
<pattern type="File">%CSIDL_DESKTOPDIRECTORY%\* [*.exe]</pattern>
<pattern type="File">%CSIDL_DESKTOPDIRECTORY%\* [*.lnk]</pattern>
<pattern type="File">%CSIDL_DESKTOPDIRECTORY%\* [*.lnk2]</pattern>

<pattern type="File">%CSIDL_COMMON_DESKTOPDIRECTORY%\* [*.msi]</pattern>
<pattern type="File">%CSIDL_COMMON_DESKTOPDIRECTORY%\* [*.exe]</pattern>
<pattern type="File">%CSIDL_COMMON_DESKTOPDIRECTORY%\* [*.lnk]</pattern>
<pattern type="File">%CSIDL_COMMON_DESKTOPDIRECTORY%\* [*.lnk2]</pattern>

<pattern type="File">%CSIDL_DEFAULT_DESKTOP%\* [*.msi]</pattern>
<pattern type="File">%CSIDL_DEFAULT_DESKTOP%\* [*.exe]</pattern>
<pattern type="File">%CSIDL_DEFAULT_DESKTOP%\* [*.lnk]</pattern>
<pattern type="File">%CSIDL_DEFAULT_DESKTOP%\* [*.lnk2]</pattern>

<pattern type="File">%CSIDL_COMMON_PROGRAMS%\* [*]</pattern>
<pattern type="File">%CSIDL_COMMON_STARTMENU%\* [*]</pattern>
<pattern type="File">%CSIDL_COMMON_STARTUP%\* [*]</pattern>
<pattern type="File">%CSIDL_DEFAULT_PROGRAMS%\* [*]</pattern>
<pattern type="File">%CSIDL_DEFAULT_STARTMENU%\* [*]</pattern>
<pattern type="File">%CSIDL_DEFAULT_STARTUP%\* [*]</pattern>
<pattern type="File">%CSIDL_PROGRAMS%\* [*]</pattern>
<pattern type="File">%CSIDL_STARTMENU%\* [*]</pattern>
<pattern type="File">%CSIDL_STARTUP%\* [*]</pattern>


</objectSet>
</unconditionalExclude>
</rules>
</role>
</component>
</migration>  

Attached File
 wnb.xml (2.31K)

Number of downloads: 0

to use the file above, simply specify it in your Capture User State and Restore user State steps or manually specify it using i:\wnb.xml for example as below:-

C:\USMT\USMT\x64\scanstate.exe C:\USMTStores\OLD_COMPUTERNAME /c /o /nocompress /uel:30 /i:C:\USMT\USMT\x64\WNB.xml /i:C:\USMT\USMT\x64\MigApp.xml /i:C:\USMT\USMT\x64\MigUser.xml /config:C:\USMT\USMT\x64\Windows7_Config.xml /v:13 /l:C:\Windows\temp\scanstate.log /progress:C:\Windows\temp\scanstate_progress.log

the original post is here on windows-noob.com

This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.