none
Windows 7 WAIK + WDS +sysprep - CopyProfile still not working?

    Question

  • Hi all,

    I've been working on setting up some Windows 7 images using sysprep, the idea being to use Ghost to push out the sysprepped image with just a prompt for the computer name when the computer starts up so that we can just plonk the machines on a users desk and once the computer name is initialized then join the domain and let group policy do the rest. I haven't gotten it yet to not create an additional user account as part of the final install - but we'll leave that for another day.

    Initial template image installed via WDS using an unattend file, group policy and a some installation of custom laptop drivers get me to the point where I'm ready to sysprep the final product before ghosting. Ghosting with the current version we're licensed for works fine with Vista/Windows 7 so there are no issues with Ghost.

    I've gone through and used a domain profile with admin rights to the PC, set up all the preferences and configs etc so I have a final desktop that I want users to get the first time they login.

    Created an unattend.xml file with WAIK to answer all the annoying install questions apart from user account creation and computer name - this I've tested and it works.

    Now according to some instructions I've found the way to copy the test profile into the default user profile as part of the sysprep process is to do the following:

       - Use the WAIK to create an xml file that has the CopyProfile value set to true in the Specialize section
       - On the target computer, copy the xml file you created in c:\windows\system32\sysprep
       - Run sysprep and enter Audit Mode: Start > Run > C:\Windows\System32\sysprep\sysprep.exe - choose Audit Mode from the list
           - From within Audit Mode:
           - Open a command prompt window and go to c:\windows\system32\sysprep
           - Type sysprep.exe /generalize /oobe /quiet /unattend:filename.xml

    What I'm finding though is that while the unattend.xml file answers all the queries it needs to and the image installs perfectly fine - the test profile desktop settings are NOT copied to where the default user stuff would normally go. A quick example is that the test profile has it's desktop theme set to Australia and a customized start menu with some extra shortcuts in the quicklaunch taskbar. The new user account that was created as part of the install prompts has none of these defaults configured.

    Can anyone give a bullet/idiot proof set of instructions on how they got the CopyProfile option working?

    It's the only thing at the moment stopping us from deploying windows 7 in our environment and creating the settings manually isn't going to be feasible. I've heard of some dodgy utils that enable the 'Copy to' option in the profiles tab which would copy over a user profile settings to the default user, but I'd like to try and do it right first time.

    Thanks - Matt.

    Monday, January 18, 2010 7:59 AM

Answers

  • I have mine working. Basically  I performed all customizations logged on as Administrator. I am using SCCM 2007 for imaging. Before I capture the image, I remove all profiles except for the Administrator profile. Copy profile in the unattend.xml file will then copy the Administrators profile just fine, including the Windows metrics so all my ICONS stay in the proper place. I too had issues  keeping Word, Excel and Powerpoint pinned to the task bar. I solved that my using a simple local login script.

     

    '=========================================================================
    ' VBScript Source File -- PinMSO2007.vbs
    '
    ' AUTHOR:  Robert Royce
    ' COMPANY: Skidmore College
    ' DATE:    10/28/2009
    ' COMMENT: This script will pin Word, Excel and PowerPoint to the Windows 7
    '           taskbar. This is to be used as a local login
    '=========================================================================


    Const CSIDL_COMMON_PROGRAMS = &H17
    Const CSIDL_PROGRAMS = &H2

    Set objShell = CreateObject("Shell.Application")
    Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
    strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path

    Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")

    ' Pin Microsoft Word
    Set objFolderItem = objFolder.ParseName("Microsoft Office Word 2007.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next

    ' Pin Microsoft Excel
    Set objFolderItem = objFolder.ParseName("Microsoft Office Excel 2007.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next


    ' Pin Microsoft PowerPoint
    Set objFolderItem = objFolder.ParseName("Microsoft Office PowerPoint 2007.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next



    ' Pin Microsoft Outlook
    Set objFolderItem = objFolder.ParseName("Microsoft Office Outlook 2007.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next

    Wscript.Quit

    Thursday, March 25, 2010 11:58 AM

All replies

  • I am having the same problem although I haven't tried the suggestions on Brian Jackson's Blog yet. I do recall that I had the same problem with XP. The difference there was that MSFT eventually released a hotfix for that (although it was only available if you contacted MSFT directly). I am hoping to have a play with it over the next few days so I'll let you know if I find anything. Perhaps you could do the same.
    Monday, February 01, 2010 9:23 AM
  • Although I'm still testing all the build options, and not sure of this, all my readings point to the copy profile thing only working if the settings are applied to the default admin account that you log in audit mode, as that will be the one copied over to default.
    Tuesday, February 02, 2010 9:18 PM
  • Can I just clarify - this is the administrator account that Windows 7 creates by default but disables? I'll have to check about the audit mode stuff, but I'd really like to get this working.

    At this stage we've delayed our presentation to management about roadshowing windows 7 to our staff because we can't guarantee a consistent desktop experience because of the default profile problem (some of the PCs will not be on the domain so group policy can't really be applied in this case), and just as a general policy we like to give users a default profile to start with so if things are reset they go back to this known state rather than the vanilla desktop.

    It can't really be this hard can it? - Matt.



    • Proposed as answer by BoyAcer2010 Wednesday, June 16, 2010 7:19 PM
    Monday, February 15, 2010 3:08 AM
  • I am having the same exact problem!  I've been working on this for quite some time (months now).  Doing the manual overwrite of the Default profile folder only causes problems down the road, so that's out. 

    Has anyone come up with a solution?  I did read somewhere that you can set the default background image by overwriting the img0.jpg in c:\windows\web\wallpaper\windows, but I that hasn't worked either.  I'm thinking that I need to create a custom theme, save it to the proper place, then add it to the answer file I create in WAIK. 

    Any thoughts on this approach?  Still doesn't really solve the taskbar pinned items issue though...

    -Jacob
    Wednesday, February 17, 2010 10:09 PM
  • I'm in deployment phase now, and copy profile was successful. At least I have all users getting the start menu and desktop theme settings that were applied in audit mode.
    The trick was to include the <copy profile> switch in the unattended .xml that would be called from audit mode with sysprep /generalize /oobe /shutdown /unattend:filename.xml
    Wednesday, February 17, 2010 10:17 PM
  • I had some problems with the copy profile as well.  I had been trying to do it from the user created account. I went into the user created admin account automatically at first startup then went into computer/manage/local users and groups/users/right clicked administrator and enabled it as well as set a password for it.  I logged out of the user created account then into the local admin account.  Once I was in the local admin account, I deleted the user created account following the steps above and deleting the corresponding user directory or it will show up on all your images.

    Other than that, the component in my unattend.xml file that does handle the copying is located in the specialize pass and looks like this: 

    - <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856a12568d5" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <CopyProfile>true</CopyProfile>
      <ShowWindowsLive>false</ShowWindowsLive>
      <TimeZone>Pacific Standard Time</TimeZone>
      </component>
    Wednesday, March 03, 2010 9:58 PM
  • I am in the same boat. I set the copy profile to true in the sysprep.xml file and it seems to copy over most of my settings but the following do not copy over:

    1. Items pinned to the taskbar - I pinned our 5 or 6 most used programs but the only ones carried over after sysprep are IE, Media Player, and Explorer
    2. Action Center - I unchecked all notifications but after sysprep they are all checked
    3. Java control panel - I unchecked "Check for updates automatically" but after sysprep it was checked
    4. I removed from the Start Menu Getting Started, Internet Explorer (64bit), and Internet Explorer (No Add-ons) and they all show up after sysprep

    I have been digging a lot on items 1 and 2 above to find solutions and so far have only found ones that seem a bit klugy. This is not a knock on the people who came up with these solutions, Microsoft just does not provide an easy way to accomplish the above. Please let me know if you have found any solutions to the above.


    Friday, March 05, 2010 4:47 PM

  • What I'm finding though is that while the unattend.xml file answers all the queries it needs to and the image installs perfectly fine - the test profile desktop settings are NOT copied to where the default user stuff would normally go. A quick example is that the test profile has it's desktop theme set to Australia and a customized start menu with some extra shortcuts in the quicklaunch taskbar. The new user account that was created as part of the install prompts has none of these defaults configured.

    Can anyone give a bullet/idiot proof set of instructions on how they got the CopyProfile option working?

    It's the only thing at the moment stopping us from deploying windows 7 in our environment and creating the settings manually isn't going to be feasible. I've heard of some dodgy utils that enable the 'Copy to' option in the profiles tab which would copy over a user profile settings to the default user, but I'd like to try and do it right first time.

    Thanks - Matt.

    This is exactly the problem I've been having.  My Theme and "quick launch" bar settings do not get copied over with the CopyProfile command.  Theme can be semi solved by saving it and manually reapplying it but that adds a step when I'm trying to reduce them.  My desktop icons get copied so what I've been doing is setting all my "quick launch" stuff on the desktop and then repinning them after sysprep.

    I'm currently imaging a new PC so I was going to try a few things while I can.

    Has anyone tried manually copying the profile over in Linux (yeah yeah, you aren't supposed to do that) and then using CopyProfile in the sysprep anyway?  Does that negate the issue of messed up paths in the registry or do they still get left behind?


    Good luck all!  One would think Microsoft would have at least addressed this issue considering I haven't seen an actual answer for it ANYWHERE.


    Jesse
    Tuesday, March 09, 2010 3:40 PM
  • TechNet's information on CopyProfile says that it will copy the logged in user's profile.  

    However I have only tried it with the local admin account and I can say that it does work.  Have not had any problems yet.

    To avoid having to create a user account that you're going to delete anyways...at the the screen that prompts you to create a user, just push control-shift-f3 and that will log you in as the local admin in audit mode.
    Wednesday, March 10, 2010 12:26 AM
  • I believe that is the key (Ctrl-Shift-f3).  The problem is not that the copy profile does not work, it is that the customizations must be made in audit mode to "stick".  Because of the way Windows 7 tatoos the registry, only things set while in the local admin account will copy over.  In addition, if you actually login as the local admin, and then make your changes, it will tatoo that account deep down in the registry.  The way to setup your base image is to use the Ctrl-Shift-f3 (Audit mode) to make any cutomizations before Sysprepping your final image.

    One word of warning!!  For Corporate deployments be sure to set the local admin account and password in your unattend.xml file or your users will be able to do anything to your carefully prepared image on first use.  IDK why Microsoft makes it so hard to carry out basic admin tasks like prepping and imaging, even after you shell out $$$$ for something like SCCM you still have to jump through all these hoops.

    Wake up Microsoft, it should "just work", right out of the box.

    Tuesday, March 23, 2010 4:39 PM
  • I have mine working. Basically  I performed all customizations logged on as Administrator. I am using SCCM 2007 for imaging. Before I capture the image, I remove all profiles except for the Administrator profile. Copy profile in the unattend.xml file will then copy the Administrators profile just fine, including the Windows metrics so all my ICONS stay in the proper place. I too had issues  keeping Word, Excel and Powerpoint pinned to the task bar. I solved that my using a simple local login script.

     

    '=========================================================================
    ' VBScript Source File -- PinMSO2007.vbs
    '
    ' AUTHOR:  Robert Royce
    ' COMPANY: Skidmore College
    ' DATE:    10/28/2009
    ' COMMENT: This script will pin Word, Excel and PowerPoint to the Windows 7
    '           taskbar. This is to be used as a local login
    '=========================================================================


    Const CSIDL_COMMON_PROGRAMS = &H17
    Const CSIDL_PROGRAMS = &H2

    Set objShell = CreateObject("Shell.Application")
    Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
    strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path

    Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")

    ' Pin Microsoft Word
    Set objFolderItem = objFolder.ParseName("Microsoft Office Word 2007.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next

    ' Pin Microsoft Excel
    Set objFolderItem = objFolder.ParseName("Microsoft Office Excel 2007.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next


    ' Pin Microsoft PowerPoint
    Set objFolderItem = objFolder.ParseName("Microsoft Office PowerPoint 2007.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next



    ' Pin Microsoft Outlook
    Set objFolderItem = objFolder.ParseName("Microsoft Office Outlook 2007.lnk")
    Set colVerbs = objFolderItem.Verbs
    For Each objVerb in colVerbs
        If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
    Next

    Wscript.Quit

    Thursday, March 25, 2010 11:58 AM
  • Ive been in similar boat, and some things are still quite confusing.

    I have followed Brian Lee Jackson excellent article on doing this and have followed the documentation included with WAIK tools.

    On both instructions, sysprep simply fails and nothing work works (ie join to domain, activate windows, script doesnt delete the xml after sysprep run, etc). trying on win 7 32 and 64 bit machines.

    Heres my questions:

    Do you need to do the build from scratch in audit mode (ctrl shft f3) after running install?

    Or can you just go in, do all your stuff then run sysprep to reboot in audit mode and then run sysprep from the command line(sysprep.exe /generalize /oobe /quiet /unattend:filename.xml)

    If its the first one, then imagine going thru all that, getting something wrong and having to do it all over again.

    I think part of the problem is this whole disabled administrator account thing, never liked it, never will.

    I think this is a very convoluted process. Win 7 rocks, but this process needs serious help.

    ideas?

    Thursday, April 08, 2010 4:33 PM
  • Ive been in similar boat, and some things are still quite confusing.

    I have followed Brian Lee Jackson excellent article on doing this and have followed the documentation included with WAIK tools.

    On both instructions, sysprep simply fails and nothing work works (ie join to domain, activate windows, script doesnt delete the xml after sysprep run, etc). trying on win 7 32 and 64 bit machines.

    Heres my questions:

    Do you need to do the build from scratch in audit mode (ctrl shft f3) after running install?

    Or can you just go in, do all your stuff then run sysprep to reboot in audit mode and then run sysprep from the command line(sysprep.exe /generalize /oobe /quiet /unattend:filename.xml)

    If its the first one, then imagine going thru all that, getting something wrong and having to do it all over again.

    I think part of the problem is this whole disabled administrator account thing, never liked it, never will.

    I think this is a very convoluted process. Win 7 rocks, but this process needs serious help.

    ideas?

    Thursday, April 08, 2010 4:33 PM
  • There is a kb973289 to show How to customize default user profiles in Windows 7 and in Windows Server 2008 R2, I tried and it works. The only thing is when you running in a normal administrator account ( like you create when install win7), please use sysprep /generalize /reboot /audit /unattend:filename.xml so all the settings will be copyed to default user profile.
    Wednesday, April 14, 2010 9:21 AM
  • Allen, I thought this was the answer.

    I tried again using the command line you gave (sysprep /generalize /reboot /audit /unattend:sysprep.xml), alas same problems.

    It seems the 2 missing components still stuck are joining to domain and activating. And its not running the scripts to remove the sysprep file and such.

    I know Ive recreated the sysprep several times following the waik documentation and brian lee jacksons, so Im pretty sure its correct.

    Oh well, guess Ill keep trying.

    Wednesday, April 14, 2010 3:09 PM
  • I have a lot troubles with getting a grip on the syntax of the unattend.xml file, could you share the XML file you use. Or a simple version which also works, if you have any information in you primery one you don’t want to share?

    I have read everything about CopyProfile I could get my hands on, but still I can’t get the syntax right.

    It would really help me a lot.

    Wednesday, May 12, 2010 3:04 PM
  • I'm having the same problems.  The desktop icons copy over no problem, but the quick launch icons are NOT there, and customized settings for IE, WMP, Office, Adobe, Java, etc, are reset to default, and each new user that logs into the computer has to reconfigure these applications.  It's not the end of the world, but why can't it just be easy?

    This is a huge pain in the ____.  Microsoft really needs to streamline this ASAP, because we will not deploy any new Windows 7 machines until we can get this straigtened out.  We want ALL workstations to be as standardized as possible.

    We're also trying to get rid of ZenWorks to migrate strictly to WDS, but because of this, we're just going to have to hold out a little longer =/

    Come on, MS..

    Friday, June 11, 2010 7:41 PM
  • Here too.  It copies most items over (theme, dektop shortcuts, favorites, custom start menu and such) but does NOT copy over pinned taskbar shortcuts.  It also adds IE shortcuts to all programs where I removed them.  As well as resets Network Location (Home, Work, Public) so the first person that logins has to select that now if they select a public profile and the GPO doesn't override it that could be some issues for firewall ports.  One other thing I have is a vbs script that runs after the xml file that asks for a computer name and that has worked on everything in the past except now on my new Dell 980's the sysprep breaks the nic driver (Intel 82578DM) the nic gets installed but won't work unless I repair it.  These are just my issues.  I hope it can be fixed in SP1!
    Thursday, June 24, 2010 3:09 AM
  • I was finally able to get sysprep to do what I wanted it to do.  I used a combination of scripting and the unattend.xml file to get it done.  I'll paste my unattend.xml file (this is for x86 ONLY) and here is what it does (script will be pasted at the bottom of this response):

    1. SkipRearm set to "1" resets the activation timer for Windows when an image is restored to a new PC.

    2. The "RunSynchronous" under the "Microsoft-Windows-Deployment component enables the built-in Administrator account (since it is disabled by default).

    3. SkipAutoActivation should be self-explanatory.

    4. "Copyprofile" set to "True" copies the current profile to the default user profile.  When you start Windows up after a fresh reformat, do NOT create a new profile when it prompts you - instead, press control+shift+F3 at this screen to enter "Audit" mode in sysprep.  This will log you into the built-in administrator account where you can do your installations and customizations of all of the software that you'd like.  You can reboot as many times as you want since it will stay in audit mode until you run sysprep with the /oobe switch.

    5. Show Windows Live = False is pretty self-explanatory.

    6. TimeZone can be set to whatever you want - just make sure you have the correct syntax.

    7. DisableFirstRunWizard = True disables that annoying prompt when you first open up Internet Explorer.  Even if you choose these settings when you're customizing your default profile, a new user will get prompted with this unless you specify this setting as "True".

    8. Home_Page is pretty obvious.  Set this to whatever you want the homepage to be for the default user.

    9. The 4 settings that are set to "en-us" specifies that I want to use United States English as the default language.

    10. "AutoLogon" will automatically log Windows into the built-in Administrator account after a computer is reimaged, assuming that you have completed #2 on this list (the RunSynchronous command).  I did not specify a password, regardless of what the string value states, so you will have to come up with a password after you reimage if you are going to copy this .xml file line for line.

    11.  The "OOBE" switches are pretty self-explanatory, but very important.  "ProtectYourPC" set to "3" means that automatic updates are disabled since I prefer to manually do the updates after reimaging - and we are running WSUS, so the client will receive auto updates as soon as it is joined to the domain.  The other settings specified here makes it so that the ONLY thing that you'll be prompted for upon starting up Windows for the first time with this particular .xml file is going to be a computer name.  It is possible to specify a computer name in the .xml file, but I did not want to automate the naming process for our work environment.

    12.  I couldn't consistently get the "StartPanelLinks" to work properly, but it does work.. sometimes.  This will place shortcuts in your start menu for you, but I just ended up scripting that.  I will get into that script later.

    13.  The "TaskbarLinks" in my .xml file actually do work, however, it does not remove the 3 default links that are there (IE, WMP, and Windows Explorer) - all this does is simply add Word, Excel, and PowerPoint 2007 to the taskbar shortcuts.  I used a script very similar to what was posted at the top of this thread to further customize the taskbar. 

    14.  Registered Name and Registered Owner needs to be changed to what you want it to be.

    ------------------------------------------------------------------------------------------------------

    <?xml version="1.0" encoding="utf-8"?>
    <unattend xmlns="urn:schemas-microsoft-com:unattend">
        <settings pass="generalize">
            <component name="Microsoft-Windows-Security-SPP" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipRearm>1</SkipRearm>
            </component>
        </settings>
        <settings pass="specialize">
            <component name="Microsoft-Windows-Deployment" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <RunSynchronous>
                    <RunSynchronousCommand wcm:action="add">
                        <Order>1</Order>
                        <Path>net user administrator /active:yes</Path>
                    </RunSynchronousCommand>
                </RunSynchronous>
            </component>
            <component name="Microsoft-Windows-Security-SPP-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <SkipAutoActivation>true</SkipAutoActivation>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <CopyProfile>true</CopyProfile>
                <ShowWindowsLive>false</ShowWindowsLive>
                <TimeZone>Eastern Standard Time</TimeZone>
            </component>
            <component name="Microsoft-Windows-IE-InternetExplorer" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <DisableFirstRunWizard>true</DisableFirstRunWizard>
                <Home_Page>http://www.yourhomepage.com/</Home_Page>
            </component>
        </settings>
        <settings pass="oobeSystem">
            <component name="Microsoft-Windows-International-Core" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <InputLocale>en-us</InputLocale>
                <SystemLocale>en-us</SystemLocale>
                <UILanguage>en-us</UILanguage>
                <UserLocale>en-us</UserLocale>
            </component>
            <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                <AutoLogon>
                    <Password>
                        <Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
                        <PlainText>false</PlainText>
                    </Password>
                    <Enabled>true</Enabled>
                    <LogonCount>5</LogonCount>
                    <Username>administrator</Username>
                </AutoLogon>
                <OOBE>
                    <HideEULAPage>true</HideEULAPage>
                    <HideWirelessSetupInOOBE>true</HideWirelessSetupInOOBE>
                    <NetworkLocation>Work</NetworkLocation>
                    <ProtectYourPC>3</ProtectYourPC>
                </OOBE>
                <StartPanelLinks>
                    <Link0></Link0>
                    <Link1></Link1>
                    <Link2></Link2>
                    <Link3></Link3>
                </StartPanelLinks>
                <TaskbarLinks>
                    <Link0>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Word 2007.lnk</Link0>
                    <Link1>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office Excel 2007.lnk</Link1>
                    <Link2>%allusersprofile%\Microsoft\Windows\Start Menu\Programs\Microsoft Office\Microsoft Office PowerPoint 2007.lnk</Link2>
                </TaskbarLinks>
                <UserAccounts>
                    <AdministratorPassword>
                        <Value>QQBkAG0AaQBuAGkAcwB0AHIAYQB0AG8AcgBQAGEAcwBzAHcAbwByAGQA</Value>
                        <PlainText>false</PlainText>
                    </AdministratorPassword>
                    <LocalAccounts>
                        <LocalAccount wcm:action="add">
                            <Password>
                                <Value>UABhAHMAcwB3AG8AcgBkAA==</Value>
                                <PlainText>false</PlainText>
                            </Password>
                            <Description>Local Administrator</Description>
                            <DisplayName>Administrator</DisplayName>
                            <Group>Administrators</Group>
                            <Name>Administrator</Name>
                        </LocalAccount>
                    </LocalAccounts>
                </UserAccounts>
                <RegisteredOrganization>Your Registered Name</RegisteredOrganization>
                <RegisteredOwner>Your Registered Owner</RegisteredOwner>
            </component>
        </settings>
        <cpi:offlineImage cpi:source="catalog:c:/dvd/sources/install_windows 7 professional.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
    </unattend>

    -------------------------------------------------------------------------------------------------

     

    On top of the .xml file, I placed this .vbs script in the "Startup" folder for the default user.  During "Audit" mode, place this script in the Startup folder of the built-in Admin account if you plan on using the "CopyProfile=True" setting, but just make sure you do not run the script before the profile is copied to the default profile - otherwise it will have already deleted itself.  The nice thing about this script is that it deletes itself after the first time a user logs on, but it is recreated every time a new user creates an account.  The user is totally unaware that a script is being run.

    In this example, I have it set to unpin Windows Media Player from the taskbar.  I wanted to keep IE and Windows Explorer there, so I didn't touch those shortcuts.  I also have the script set to pin Word, Excel, and PowerPoint 2007, as well as GroupWise to the taskbar.  The same shortcuts are pinned to the Start Menu in this example.  You should be able to figure out how to customize it yourself for any shortcuts that you may want.  I do not take full credit for this script.  I'm not even a programmer - I just picked up bits and pieces from other forums.

    One thing to take note - even if you specify Taskbar shortcuts or StartMenu shortcuts in your .xml file, this script will not duplicate those shortcuts.  This script will check to see if those shortcuts are already there, and if they aren't, it will create them for you.

    Option Explicit 

    Const CSIDL_COMMON_PROGRAMS = &H17
    Const CSIDL_PROGRAMS = &H2
    Const CSIDL_STARTMENU = &HB

    Dim objShell, objFSO
    Dim objCurrentUserStartFolder
    Dim strCurrentUserStartFolderPath
    Dim objAllUsersProgramsFolder
    Dim strAllUsersProgramsPath
    Dim objFolder
    Dim objFolderItem
    Dim colVerbs
    Dim objVerb

    Set objShell = CreateObject("Shell.Application")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objCurrentUserStartFolder = objShell.NameSpace (CSIDL_STARTMENU)
    strCurrentUserStartFolderPath = objCurrentUserStartFolder.Self.Path
    Set objAllUsersProgramsFolder = objShell.NameSpace(CSIDL_COMMON_PROGRAMS)
    strAllUsersProgramsPath = objAllUsersProgramsFolder.Self.Path


    ' - Remove pinned items -

    'Windows Media Player
    If objFSO.FileExists(strAllUsersProgramsPath & "\Windows Media Player.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath)
        Set objFolderItem = objFolder.ParseName("Windows Media Player.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
            If Replace(objVerb.name, "&", "") = "Unpin from Taskbar" Then objVerb.DoIt
        Next
    End If


    ' - Pin to Taskbar -

    'Word 2007
    If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office\Microsoft Office Word 2007.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
        Set objFolderItem = objFolder.ParseName("Microsoft Office Word 2007.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
     If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
        Next
    End If

    'Excel 2007
    If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office\Microsoft Office Excel 2007.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
        Set objFolderItem = objFolder.ParseName("Microsoft Office Excel 2007.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
     If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
        Next
    End If

    'PowerPoint 2007
    If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office\Microsoft Office PowerPoint 2007.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
        Set objFolderItem = objFolder.ParseName("Microsoft Office PowerPoint 2007.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
     If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
        Next
    End If

    'GroupWise
    If objFSO.FileExists(strAllUsersProgramsPath & "\Novell GroupWise\GroupWise.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Novell GroupWise")
        Set objFolderItem = objFolder.ParseName("GroupWise.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
     If Replace(objVerb.name, "&", "") = "Pin to Taskbar" Then objVerb.DoIt
        Next
    End If


    ' - Pin to Start Menu -

    'GroupWise
    If objFSO.FileExists(strAllUsersProgramsPath & "\Novell GroupWise\GroupWise.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Novell GroupWise")
        Set objFolderItem = objFolder.ParseName("GroupWise.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
     If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
        Next
    End If

    'Word 2007
    If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office\Microsoft Office Word 2007.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
        Set objFolderItem = objFolder.ParseName("Microsoft Office Word 2007.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
     If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
        Next
    End If

    'Excel 2007
    If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office\Microsoft Office Excel 2007.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
        Set objFolderItem = objFolder.ParseName("Microsoft Office Excel 2007.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
     If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
        Next
    End If

    'PowerPoint 2007
    If objFSO.FileExists(strAllUsersProgramsPath & "\Microsoft Office\Microsoft Office PowerPoint 2007.lnk") Then
        Set objFolder = objShell.Namespace(strAllUsersProgramsPath & "\Microsoft Office")
        Set objFolderItem = objFolder.ParseName("Microsoft Office PowerPoint 2007.lnk")
        Set colVerbs = objFolderItem.Verbs
        For Each objVerb in colVerbs
     If Replace(objVerb.name, "&", "") = "Pin to Start Menu" Then objVerb.DoIt
        Next
    End If

     

    'Delete the script
    DeleteSelf

    Sub DeleteSelf()      
            Dim objFSO
            'Create a File System Object
            Set objFSO = CreateObject("Scripting.FileSystemObject")
            'Delete the currently executing script
            objFSO.DeleteFile WScript.ScriptFullName
            Set objFSO = Nothing
    End Sub

    • Proposed as answer by cpupo Friday, August 20, 2010 11:17 AM
    Tuesday, July 06, 2010 2:06 PM
  • Does anyone know of a good source to look for similar code on the 64bit platform?
    Thursday, July 08, 2010 11:00 PM
  • Does anyone know of a good source to look for similar code on the 64bit platform?


    I put together that code without knowing a damn thing about .xml.  In fact, I don't know any programming languages.  Just download the latest Windows Automated Installation Kit, which includes Windows System Image Manager (SIM).  From there, it's pretty self-explanatory on how to build an .xml file from the Operating System of your choosing. 

    You should be able to use my .xml file as a template when you want to build one for x64-based systems.

    Windows AIK can be downloaded here:

    http://www.microsoft.com/downloads/details.aspx?FamilyID=696dd665-9f76-4177-a811-39c26d3b3b34&displaylang=en

    Monday, July 12, 2010 9:42 PM
  • This has been probably the most useful thread on the Internet for this issue. Thanks so much for everyone's responses; it was really helpful for our figuring out this issue.

    For our situation, we tried everything here on this thread and still ran into problems. Our solution came with the temp admin account that audit mode runs in. We'd changed the password during audit mode to that account and renamed it. When I named the account back 'Administrator' and deleted the password, copyprofile worked correctly.

    Hope this adds to the information!

    Wednesday, July 28, 2010 2:20 AM
  • I'm having the same problems.  The desktop icons copy over no problem, but the quick launch icons are NOT there, and customized settings for IE, WMP, Office, Adobe, Java, etc, are reset to default, and each new user that logs into the computer has to reconfigure these applications.  It's not the end of the world, but why can't it just be easy?

    This is a huge pain in the ____.  Microsoft really needs to streamline this ASAP, because we will not deploy any new Windows 7 machines until we can get this straigtened out.  We want ALL workstations to be as standardized as possible.

    We're also trying to get rid of ZenWorks to migrate strictly to WDS, but because of this, we're just going to have to hold out a little longer =/

    Come on, MS..

    Hi all. Thanks for the great info. I was wondering if anyone has tried "DoNotCleanTaskBar" = true. I just noticed it in WSIM. It's in Shell-Setup for auditsystem, generalize, offlineservicing, oobesystem and specialize passes. According to the unattend reference help file: "DoNotCleanTaskBar specifies whether Sysprep removes deskbands. A deskband is a customized toolbar that can be added to the taskbar. Deskbands contain shortcuts to frequently performed tasks." I wonder if it's the missing piece of copyprofile. If anyone interested I'll post results.

    Friday, August 13, 2010 8:37 PM
  • Im interested in the result please let me know what you find out with your testing with this issue. I in turn will test it as well. Right now the script that Snatraps has posted is working great.

    Wednesday, August 25, 2010 3:13 PM
  • Can anyone recommend a third-party utility to do what Microsoft obviously cares nothing about?  I just want to configure a profile and use that as the default.  That goes for desktop, quick launch, IE settings (including google as the default search like all of my customers want instead of IE), power, theme, etc.

    This would seem like a no-brainer but I can see why the folks at Microsoft would like to prevent us from having their defaults crammed down our throats.

    I just want a sensible default profile for everyone to start with (using most of what they would choose to begin with instead of everything that they don't want).

    Tuesday, August 31, 2010 11:55 PM
  • When you configure the default user profile make sure you delete all the entries under

    HKLM\software\Microsoft\current version\windwos NT\Profilelist list. just leave the system profiles and administrator profile delete all the other. This will fix your copy profile issue.

    for domain joing simply use first logon script  as unattended domain join function does not work the way it is suppose to work. It joins the computer to domain with random computer name.

    Friday, November 05, 2010 3:09 PM