locked
USMT block wallpaper Windows XP to 7 migration RRS feed

  • Question

  • Hello,

    I'm in a migration process from Windows XP to Windows 7. I use USMT 4 to transfer user files and configurations. However, we have a policy that change the wallpaper with one blank with custom information about the computer.

    When I run scanstate, it restores everything fine, but it restore also the old wallpaper with the wrong informations. Then, new informations are applied on this wallpaper, and everything is unreadable.

    I would like to force USMT to not backup the old wallpaper. Any ideas ?

    Thanks!

    Friday, June 12, 2015 12:57 PM

Answers

  • Yes, that's what I tought first. I think if we were not using BGInfo we wouldn't have this problem. Here's the solution I found:

    https://t3chn1ck.wordpress.com/2011/06/24/usmt-workaround-for-bginfo-desktop-wallpaper/

    I use his script, run it remotely on the source computer before runnning scanstate.

    Once the backup is restored on the destination computer, the wallpaper is the one by default and infos are not overlapping.

    The actual problem was, users customised their wallpaper, then BGInfo applied on it. When migrating with USMT their wallpaper, including the infos, was in the backup. So, when restored, BGInfo applied on the old wallpaper already containing (old) infos.

    • Marked as answer by force update Thursday, June 18, 2015 1:02 PM
    Thursday, June 18, 2015 1:02 PM

All replies

  • http://blogs.technet.com/b/askds/archive/2011/06/02/blocking-wallpaper-migration-with-usmt-or-you-are-a-jerk.aspx

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Friday, June 12, 2015 6:47 PM
  • Thanks,

    I tried using this xml:

    <migration urlid="http://www.microsoft.com/migration/1.0/migxmlext/mp3files">
        <!-- This component migrates all files except those with .mp3 extension-->
        <component type="Documents" context="System">
            <displayName>Exclude Wallpaper</displayName>
            <role role="Data">
                <rules>
                    <exclude>
                        <objectSet>
                            <pattern type="File">C:\* [Info.bmp]</pattern>
    			<pattern type="File">C:\* [*.mp3]</pattern>			
                        </objectSet>
                    </exclude>
                </rules>
            </role>
        </component>
    </migration>

    But the wallpaper (Info.bmp) is still present on the new one.

    Any other suggestion ?

    Thanks!

    Friday, June 12, 2015 7:48 PM
  • This might work... I derived it from the link earlier and:

    http://www.itninja.com/blog/view/usmt-migrating-windows-wallpaper-from-xp-to-7

    Although you have to exclude instead of include and maybe unconditionalexclude.

      <component type="System" context="User"> 
        <displayName>Wallpapers</displayName>
        <role role="Settings">
          <rules>
            <exclude>
              <objectSet>
                <pattern type="Registry">HKCU\Control Panel\Desktop [Pattern]</pattern>
                <pattern type="Registry">HKCU\Control Panel\Desktop [PatternUpgrade]</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\Software\Microsoft\Windows\CurrentVersion\Themes [SetupVersion]</pattern>
                <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [BackupWallpaper]</pattern>
                <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [TileWallpaper]</pattern>
                <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [Wallpaper]</pattern>
                <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperFileTime]</pattern>
                <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperLocalFileTime]</pattern>
                <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [WallpaperStyle]</pattern>
                <content filter="MigXmlHelper.ExtractSingleFile(NULL, NULL)">
                  <objectSet>
                    <pattern type="Registry">HKCU\Control Panel\Desktop [WallPaper]</pattern>
        <pattern type="Registry">HKCU\Software\Microsoft\Windows\CurrentVersion\Themes\* [*]</pattern>
                    <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [BackupWallpaper]</pattern>
                    <pattern type="Registry">HKCU\Software\Microsoft\Internet Explorer\Desktop\General [Wallpaper]</pattern>
                  </objectSet>
                </content>
              </objectSet>
            </exclude>
          </rules>
        </role>
      </component>
    Try making these changes and let me know of that does the trick for you.


    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.



    • Edited by Ty Glander Friday, June 12, 2015 8:22 PM
    Friday, June 12, 2015 8:17 PM
  • Hi,

    The problem is that we use Sysinternal's BGInfo. It's causing this overlapping on the desktop wallpaper.

    I will search for a solution and post it here.

    Thanks.

    Wednesday, June 17, 2015 3:31 PM
  • I would have thought just blocking the old wallpaper from coming over would have fixed it.  Is that not the original ask?

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Wednesday, June 17, 2015 6:14 PM
  • Yes, that's what I tought first. I think if we were not using BGInfo we wouldn't have this problem. Here's the solution I found:

    https://t3chn1ck.wordpress.com/2011/06/24/usmt-workaround-for-bginfo-desktop-wallpaper/

    I use his script, run it remotely on the source computer before runnning scanstate.

    Once the backup is restored on the destination computer, the wallpaper is the one by default and infos are not overlapping.

    The actual problem was, users customised their wallpaper, then BGInfo applied on it. When migrating with USMT their wallpaper, including the infos, was in the backup. So, when restored, BGInfo applied on the old wallpaper already containing (old) infos.

    • Marked as answer by force update Thursday, June 18, 2015 1:02 PM
    Thursday, June 18, 2015 1:02 PM
  • Script used:

    '==========================================================================
    ' AUTHOR  : Nick Moseley, https://t3chn1ck.wordpress.com
    ' COMMENT : This corrects a problem with migrating the BGInfo wallpaper vs.
    ' the user's actual wallpaperfile. This script will parse all User profiles
    ' on the computer, load their HKCU hive, then set the appropriate registry
    ' keys to reset a user's background image.
    ' HISTORY :
    ' 1.0 (06/23/2011) - Initial script
    ' 1.1 (02/20/2013) - Added Const LogFile to quickly define location
    '==========================================================================
    Option Explicit
     
    Const LogFile = "C:\Windows\Temp\ResetBGInfo.log"
    Const ForAppending = 8
    Const HKLM = &H80000002
    Const sReadUserKey = "Software\Winternals\BGInfo"
    Const sSetUserKey = "Control Panel\Desktop"
    Const sStringValueName = "Wallpaper"
     
    Dim oReg, oFSO, oFile, oUserSubkey, aUserProfiles, oShell
    Dim sProfileLCase, sRegExe, sRegLoad, sRegUnload, sHiveName, sSubPath, sProfile, sValueName, sKeyPathUserProfiles, sValue, ReturnVal
     
    Set oReg = GetObject("winmgmts:\\.\root\default:StdRegProv")
    Set oShell = CreateObject("WScript.Shell")
    Set oFSO = CreateObject ("Scripting.FileSystemObject")
     
    '==========================================================================
    ' Begin log file etnries
    '==========================================================================
    If Not oFSO.FileExists(LogFile) Then
    oFSO.CreateTextFile LogFile
    End If
    Set oFile = oFSO.OpenTextFile (LogFile, ForAppending, True)
     
    oFile.WriteLine "Reset BGInfo values for all users for USMT"
    oFile.WriteLine "  => Began at " & Date & " " & Time
    oFile.WriteLine "  => For each user profile, set " & sStringValueName & " (string) to the user's Wallpaper settings in HKCU\" & sSetUserKey
    '==========================================================================
     
    ' Begin configuration of existing user profiles
    sValueName = "ProfileImagePath"
    sKeyPathUserProfiles = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
    sRegExe = "C:\Windows\system32\reg.exe"
     
    oReg.EnumKey HKLM, sKeyPathUserProfiles, aUserProfiles
     
    ' Existing User Profiles
    For Each oUserSubkey In aUserProfiles
    sSubPath = sKeyPathUserProfiles & "\" & oUserSubkey
    oReg.GetExpandedStringValue HKLM,sSubPath,sValueName,sValue
     
    sProfile = Split(sValue, "\")
    sProfileLCase = LCase(sProfile(2))
     
    If sProfileLCase = "system32" Then
    'oFile.WriteLine "  => Skipped user profile: system32"
    ElseIf sProfileLCase = "localservice" Then
    'oFile.WriteLine "  => Skipped user profile: localservice"
    ElseIf sProfileLCase = "networkservice" Then
    'oFile.WriteLine "  => Skipped user profile: networkservice"
    ElseIf sProfileLCase = "serviceprofiles" Then
    'oFile.WriteLine "  => Skipped user profile: serviceprofiles"
    ElseIf sProfileLCase = "administrator" Then
    'oFile.WriteLine "  => Skipped user profile: administrator"
    Else
    sHiveName = "TempHive_" & sProfileLCase
     
    ' Load user's profile hive into a temp location
    sRegLoad = " LOAD HKLM\" & sHiveName & " """ & sValue & "\ntuser.dat"""
    oShell.Run sRegExe & sRegLoad, 0, True
     
    ' Call subroutine to change registry key
    SetConfigUserHive (sHiveName)
     
    ' Unload user's profile hive
    sRegUnload = " UNLOAD HKLM\" & sHiveName
    oShell.Run sRegExe & sRegUnload, 0, True
    End If
    Next
     
    ' End logging
    oFile.WriteLine "  => Completed at " & Date & " " & Time
    WScript.Quit (oFile.Close)
     
    Sub SetConfigUserHive (sTempHive)
    Dim sTempHiveKeyPath, sTempHiveWallpaperKeyPath, sWallpaperFile
     
    ' Path of registry keys
    sTempHiveKeyPath = sTempHive & "\" & sReadUserKey
    sTempHiveWallpaperKeyPath = sTempHive & "\" &  sSetUserKey
     
    ' Get BGInfo value
    oReg.GetStringValue HKLM, sTempHiveKeyPath, "Wallpaper", sWallpaperFile
     
    If sWallpaperFile="(None)" Or sWallpaperFile="" Then
    oReg.SetStringValue HKLM, sTempHiveWallpaperKeyPath, "Wallpaper", ""
    Else
    oReg.SetStringValue HKLM, sTempHiveWallpaperKeyPath, "Wallpaper", sWallpaperFile
    End If
     
    oFile.WriteLine "  => Set user profile: " & sProfileLCase
    oFile.WriteLine "     Note: Wallpaper value = " & sWallpaperFile
    End Sub

    Thursday, June 18, 2015 7:01 PM