none
How to Block Themes, Wallpapers and other Display Customizations (DPI, Scaling, Window Color and Appearance) with USMT 5.0? RRS feed

  • Question

  • I'm doing something wrong, but I can't figure out what.

    I've read some great write ups on the subject:

    and used part of the XML in their example, but the wallpaper, themes and other display customizations are still coming over.  Now I'm trying to use MigXmlHelper.DestinationPriority() but really its just my last ditch effort.

    From an elevated command prompt in C:\USMT\amd64\, I'm executing:

    scanstate.exe E:\USMTBackup /config:nothemeuiconfig.xml /i:MigApp.xml /i:MigDocs.xml /i:MigUser.xml /i:unconditionalexclusions.xml /i:blockwallpaperandthemev3.xml /i:getlocalpsts.xml /i:inclusions.xml /ui:domain1\user1 /ue:*\* /vsc /c /o /nocompress /localonly /v:13 /l:\\path\to\scanstate.log /progress:\\path\to\scanstate_progress.log /listfiles:\\path\to\scanstate_listfiles.log

    The blockwallpaperandthemev3.xml contains:

    <?xml version="1.0" encoding="UTF-8"?>
    <migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/blockwallpaperandthemev3">
    	<component type="Documents" context="User">
    		<displayName>Block Wallpaper, Theme and Display Registry Settings</displayName>
    		<role role="Data">
    			<rules>
    				<unconditionalExclude>
    					<objectSet>
                <!-- Blocks wallpaper, themes (which include wallpaper) and other display/visual customizations (DPI, Screen Saver, Window Color & Appearance etc.) in the registry when migrating from Vista, 7 and beyond -->
    						<pattern type="Registry">HKCU\Control Panel\Appearance\* [*]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [Pattern]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [SCRNSAVE.EXE]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [TileWallpaper]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [WallPaper]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [WallPaperStyle]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop\Colors [*]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop\WindowMetrics [*]</pattern>
    						<pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperSource]</pattern>
    						<pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers\* [*]</pattern>
    						<pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\ThemeManager\* [*]</pattern>
    						<pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\* [*]</pattern>
    					</objectSet>
    				</unconditionalExclude>
    				<merge script="MigXmlHelper.DestinationPriority()">
    					<objectSet>
    						<pattern type="Registry">HKCU\Control Panel\Appearance\* [*]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [Pattern]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [SCRNSAVE.EXE]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [TileWallpaper]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [WallPaper]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop [WallPaperStyle]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop\Colors [*]</pattern>
    						<pattern type="Registry">HKCU\Control Panel\Desktop\WindowMetrics [*]</pattern>
    						<pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperSource]</pattern>
    						<pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers\* [*]</pattern>
    						<pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\ThemeManager\* [*]</pattern>
    						<pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\* [*]</pattern>
    					</objectSet>
    				</merge>
    			</rules>
    		</role>
    	</component>
    
    
    	<!-- This component blocks wallpaper & screen saver files -->
    	<component type="Documents" context="User">
    		<displayName>Block Wallpapers and Theme Files</displayName>
    		<role role="Data">
    			<rules>
    				<unconditionalExclude>
              <objectSet>
                <content filter="MigXmlHelper.ExtractSingleFile(NULL, NULL)">
                  <objectSet>
    							  <pattern type="Registry">HKCU\Control Panel\Desktop [SCRNSAVE.EXE]</pattern>
    							  <pattern type="Registry">HKCU\Control Panel\Desktop [WallPaper]</pattern>
    							  <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperSource]</pattern>
                    <pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\* [*]</pattern>
                  </objectSet>
                </content>
    					</objectSet>
    				</unconditionalExclude>
    				<merge script="MigXmlHelper.DestinationPriority()">
    				  <objectSet>
                <content filter="MigXmlHelper.ExtractSingleFile(NULL, NULL)">
                  <objectSet>
      							<pattern type="Registry">HKCU\Control Panel\Desktop [SCRNSAVE.EXE]</pattern>
    	  						<pattern type="Registry">HKCU\Control Panel\Desktop [WallPaper]</pattern>
    		  					<pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperSource]</pattern>
                    <pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\* [*]</pattern>
                  </objectSet>
    					  </content>
              </objectSet>
    				</merge>
    				<unconditionalExclude>
    					<objectSet>
    						<pattern type="File">%CSIDL_LOCAL_APPDATA%\Microsoft\Windows\Themes\* [*]</pattern>
    						<pattern type="File">%CSIDL_APPDATA%\Microsoft\Windows\Themes\* [*]</pattern>
    						<pattern type="File">%CSIDL_WINDOWS%\Resources\Ease of Access Themes\* [*]</pattern>
    						<pattern type="File">%CSIDL_WINDOWS%\Resources\Themes\* [*]</pattern>
    						<pattern type="File">%CSIDL_WINDOWS%\Web\Wallpaper\* [*]</pattern>
    					</objectSet>
    				</unconditionalExclude>
    				<merge script="MigXmlHelper.DestinationPriority()">
    					<objectSet>
    						<pattern type="File">%CSIDL_LOCAL_APPDATA%\Microsoft\Windows\Themes\* [*]</pattern>
    						<pattern type="File">%CSIDL_APPDATA%\Microsoft\Windows\Themes\* [*]</pattern>
    						<pattern type="File">%CSIDL_WINDOWS%\Resources\Ease of Access Themes\* [*]</pattern>
    						<pattern type="File">%CSIDL_WINDOWS%\Resources\Themes\* [*]</pattern>
    						<pattern type="File">%CSIDL_WINDOWS%\Web\Wallpaper\* [*]</pattern>
    					</objectSet>
    				</merge>
    				<unconditionalExclude>
    					<objectSet>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Users\*\AppData\Local\Microsoft\Windows\Themes\* [*]","Fixed")</script>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Users\*\AppData\Roaming\Microsoft\Windows\Themes\* [*]","Fixed")</script>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Windows\Resources\Ease of Access Themes\* [*]","Fixed")</script>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Windows\Resources\Themes\* [*]","Fixed")</script>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Windows\Web\Wallpaper\* [*]","Fixed")</script>
    					</objectSet>
    				</unconditionalExclude>
    				<merge script="MigXmlHelper.DestinationPriority()">
    					<objectSet>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Users\*\AppData\Local\Microsoft\Windows\Themes\* [*]","Fixed")</script>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Users\*\AppData\Roaming\Microsoft\Windows\Themes\* [*]","Fixed")</script>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Windows\Resources\Ease of Access Themes\* [*]","Fixed")</script>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Windows\Resources\Themes\* [*]","Fixed")</script>
    						<script>MigXmlHelper.GenerateDrivePatterns ("\Windows\Web\Wallpaper\* [*]","Fixed")</script>
    					</objectSet>
    				</merge>
    			</rules>
    		</role>
    	</component>
    </migration>

    I generated a config.xml called nothemeuiconfig.xml and changed this:

    <component displayname="Microsoft-Windows-themeui" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-themeui/microsoft-windows-themeui/settings"/>

    To this:

    <component displayname="Microsoft-Windows-themeui" migrate="no" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-themeui/microsoft-windows-themeui/settings"/>


    But themes, wallpapers - everything - still come over.


    Opened a case with Microsoft, sent them:

    • the XML's I'm using
    • the command I used to generate the config.xml
    • the command I used for scanstate
    • the log files generated by scanstate
    • the command I used for loadstate
    • the log files generated by loadstate


    Summary result of the MS case:

    • After much review & scrutiny, the command line and XML files are syntactically correct and rules are sound.
    • The articles I referenced in the ticket are indeed old and speak of an older version of USMT, so I can accept the possibility that something may have changed between USMT versions that render those suggested rules & instructions invalid.
    • Despite using unconditionalExclude to unconditionally globally exclude objects, something else is trumping that rule, and there’s no way around that.
    • Even using MigXmlHelper.DestinationPrioity() won’t help us here because, like above, something else trumps that rule, and there’s no way around that.
    • The last proposed suggestion is to disable the shmig component, which may or may not break or otherwise adversely affect the backup/restore of other things.  (This may be too difficult to detect easily or in initial testing and the uncertainty doesn’t give us confidence problems won’t arise as a result of this change.  Also, Ned Pyle's post post says NOT to, but then again that's an old post.)


    Is this no longer possible or am I'm just doing it wrong?




    • Edited by JuliusPIV Monday, November 24, 2014 7:09 PM
    Wednesday, November 19, 2014 9:17 PM

All replies

  • Have you made any additional progress on this? I'm running into the same thing. I haven't added as many lines as you, but what worked in USMT 4 isn't in 5 or 6
    Friday, November 21, 2014 11:11 PM
  • Not sure what else it's not taking over that I may want but I switched the line below to "no" in my config file and USMT 5 is now honoring my XML's by not taking the pinned items, background, or themes.

    <component displayname="Appearance and Display" migrate="no" ID="appearance_and_display">

    I also turned the "Microsoft-Windows-themeui" line back to yes and it still worked. 

    Hopefully that helps

    Saturday, November 22, 2014 1:41 AM
  • Thanks for the reply TimAmico!

    I saw your responses on Friday & Saturday, but didn't reply because I wanted to think this over a bit and try to get a second opinion.

    The 'Appearance and Display' component looks to have a has a number of sub-components.

        <component displayname="Appearance and Display" migrate="yes" ID="appearance_and_display">
          <component displayname="Windows Games Settings" migrate="yes" ID="appearance_and_display\windows_games_settings">
            <component displayname="Microsoft-Windows-GameExplorer" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-gameexplorer/microsoft-windows-gameexplorer/settings"/>
          </component>
          <component displayname="Taskbar and Start Menu" migrate="yes" ID="appearance_and_display\taskbar_and_start_menu">
            <component displayname="Microsoft-Windows-stobject" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-stobject/microsoft-windows-stobject/settings"/>
            <component displayname="Microsoft-Windows-explorer" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-explorer/microsoft-windows-explorer/settings"/>
          </component>
          <component displayname="Personalized Settings" migrate="yes" ID="appearance_and_display\personalized_settings">
            <component displayname="Microsoft-Windows-uxtheme" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-uxtheme/microsoft-windows-uxtheme/settings"/>
            <component displayname="Microsoft-Windows-themeui" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-themeui/microsoft-windows-themeui/settings"/>
            <component displayname="Microsoft-Windows-shmig" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-shmig/microsoft-windows-shmig/settings"/>
            <component displayname="Microsoft-Windows-shell32" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-shell32/microsoft-windows-shell32/settings"/>
            <component displayname="Microsoft-Windows-CommandPrompt" migrate="yes" ID="http://www.microsoft.com/migration/1.0/migxmlext/cmi/microsoft-windows-commandprompt/microsoft-windows-commandprompt/settings"/>
          </component>
        </component>


    If I'm understanding the XML correctly, setting 'Appearance and Display' to 'no' will not bring over any of the sub components:

    • Windows Games Settings: Microsoft-Windows-GameExplorer
    • Tarkbar & Start Menu: Microsoft-Windows-stobject
    • Tarkbar & Start Menu: Microsoft-Windows-explorer
    • Personalized Settings: Microsoft-Windows-uxtheme
    • Personalized Settings: Microsoft-Windows-themeui
    • Personalized Settings: Microsoft-Windows-shmig
    • Personalized Settings: Microsoft-Windows-shell32
    • Personalized Settings: Microsoft-Windows-CommandPrompt

    If so, that, to me at least, represents a pretty significant change!  We want the pinned items but not the backgrounds and themes so that specific change won't work for us, but glad to hear it meets your needs.  (Also greatly appreciate your sharing your results with us.)

    I'll admit, even before reaching out to MS, the logs clearly show that the themes/backgrounds are all part of the 'Microsoft-Windows-shmig' component but dang it if I want something of substance (read: official documentation) that covers what exactly that component handles.  (I like to know what I'm potentially getting myself into.)

    Monday, November 24, 2014 7:08 PM
  • So I guess this isn't possible?

    Tuesday, January 6, 2015 4:44 PM