Jump to content


  • 0
Phylum

USMT 5.0 Block Themes, Wallpapers and other Display Customizations (DPI, Window Color and Appearance etc.)

Question

We're fine with backing up themes, wallpapers and other display customizations (DPI, window color & appearance etc.) because it gives us something to go back to or restore if its truly need.
However, we do not want to restore the aforementioned on the destination PC by default. I must be doing something wrong and I can't figure out what and need some help.

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

and used part of their example XML in my own, but everything (wallpaper, themes and other display customizations) is still coming over. Now I'm trying to use MigXmlHelper.DestinationPriority() but really its just a 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"/>



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 says NOT to, but then again that's an old post.)


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

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

does enabling additional logging help to troubleshoot your issue ?

 

http://www.niallbrady.com/2012/01/25/troubleshooting-usmt/

 

you can enable a Diagnostic mode by setting a variable called MIG_ENABLE_DIAG to be equal to a filename both on your Scanstate source and Loadstate Destination. To set MIG_ENABLE_DIAG as a system variable do as follows,

  • open a command prompt, and type set MIG_ENABLE_DIAG=<filename path>, eg:

set MIG_ENABLE_DIAG=C:\Windows\TEMP\MIG_DIAG.LOG

  • perform your scanstate or loadstate commands
  • review the newly created log in C:\Windows\TEMP

the resulting log file contains details about mappings, patterns, group names, and a whole lot more and is granular in detail, so if you want to find out why your custom USMT xml files are not doing what you told them to then enable this option and review the new log.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.