How CopyProfile Works in Windows 7 Deployments

by RickGates 30. October 2011 16:03

Re-post of Johan Arwidmark

There seem to be quite much confusion on how CopyProfile works in Windows 7. The major source for the confusion is that the Windows AIK documentation is incorrect. I felt it was about time to write a post on how it really works :)

The scenario is that you want make configurations to the default user profile. The CopyProfile feature in the unattend.xml file is just one of many ways to do that. In the Resources section I have put links to other methods, not covered in this post.

CopyProfile

In the Windows 7 unattend.xml there is a CopyProfile value you can set to true. If you set the CopyProfile to True in the Specialize Pass of the unattend.xml file used to deploy your image, the administrator profile in your image will be copied to default user.

Please note that the copy happens when you deploy the image, not when Sysprep runs (like the WAIK documentation incorrectly states).

Step-by-Step Guide

If you are using MDT 2010 Step 1 - 3 are done automatically, but I explain them anyway

1. Deploy Windows 7 to a virtual machine, make sure you only have one single enabled account, the local administrator account (see Limitations).

2. Customize the administrator profile as you want it to be

3. Sysprep the machine and capture it

4. Deploy the captured image by running setup.exe with an answer file where the CopyProfile is set to True in the Unattend.xml (Specialize Pass).

Limitations

All Customizations to Default User Profile Lost

http://support.microsoft.com/kb/2101557

Additional Resources

 

 

Configuring Default User Settings – Full Update for Windows 7 and Windows Server 2008 R2

 

http://blogs.technet.com/b/deploymentguys/archive/2009/10/29/configuring-default-user-settings-full-update-for-windows-7-and-windows-server-2008-r2.aspx

 

How to customize the default local user profile when you prepare an image of Windows Vista, Windows Server 2008, Windows 7, and Windows Server 2008 R2

 

http://support.microsoft.com/kb/973289

Tags:

Troubler Shooter Blog

by RickGates 9. September 2011 18:46

Tags:

WMI Repair Utility

by RickGates 9. September 2011 18:42

If you are having trouble with WMI, try this repair utility.

http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=7684

Tags:

Prerequisite hotfix for System Center Configuration Manager 2007 R3

by RickGates 9. September 2011 18:15

You must install this hotfix package before you install System Center Configuration Manager 2007 R3 on a client computer

 

http://support.microsoft.com/kb/977384

 

 

Tags:

SCCM Drivers Using Categories Not Applying Properly using Auto Apply Drivers?

by RickGates 8. September 2011 13:54
[No text]

Tags:

SCCM OSD TS Step and RUNAS Command (Oil and Water)

by RickGates 19. July 2011 07:15

When a OSD task sequence step script try's to execute a RUNAS command that command will fail with the error "access denied".   The issue is while SCCM OSD Task Sequence manager is running that the RUNAS fails.  A work around is create a vbs script that sets the RUNONCE key and then runs a batch file that copies the RUNAS program locally and sets the RUNONCE key to run it locally from TEMP directory after the task sequence has completed.

Example RunOnce.VBS to set RUNONCE

const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."

Set StdOut = WScript.StdOut

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_ strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce"

strValueName = "MyRunOnce"

strValue = "C:\Windows\Temp\MYPGM.exe"

oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue

 

The Task Sequence Step runs this batch RUNONCE.Bat:

Copy MyPGM.exe C:\Windows\Temp /y

CScript RunOnce.vbs

 

The trick is to put this as the last line in your task sequence and when the task sequence finishes anything added to RUNONCE key is executed.

 

Tags:

ZTIUserState.Wsf Error 450 Wrong Number of Arguments or Invalid Property Assignment

by RickGates 8. June 2011 08:21

When you set the USMTConfigFile parameter in the CustomSettings.ini to your Config.xml and run the ZTIUserState.wsf script you may have received the error 450 "wrong number of Arguments" and thinking to yourself, it was just working and one parameter now causes the user data backup to fail.  Well Yes, the bug is in the ZTIUserState.wsf and to fix it, locate the FindFile calls and you will find four lines where they forgot to add the return parameter sFoundXML and viola.  The changes you will make are in the section where it handles copying of the Config.Xml file the lcoal drive for USMT.  Interesting if you download the MDT 2012 beta in the ZTIuserState.wsf in 2012 it is fixed there...

Tags:

SCCM Unknown Computer Collection Accidentally Deleted?

by RickGates 15. March 2011 10:47

I heard from a customer that one of their SCCM administrators accidently deleted the "Unknown Computers" collection and now they need a way to recover that collection.  Well to fix this just re-run the SCCM 2007 R2 or R3 release and "Bada Bing Bada Boom" the "Unknown Computer Collection" comes back.  Make sure that the SCCM Administrator does not try to help you out and re-create the "Unknown Computers Collection" manually, that  will cause the query rule to not be re-installed porperly.  Also don't forget to to readvertise all of the OSD packages that were advertiseed to the "Unknown Computer Collection"

Tags:

SCCM OSD Deployments using 802.1x

by RickGates 12. March 2011 13:55

Here is the document I put together that walks through the steps of creating the certificates required for zero touch refresh process, setting up the SCCM WINPE Boot package to support New computer bare metal deployment process that prompts for the credentals using PEAP to authenicate and the zero touch refresh process that uses certificate and EAP 802.1x authenication.  Also provided a JoinDomain script to handle the joining the machine to the domain in the state restore phase.

SCCMOSD8021X.doc (3.75 mb)

Tags:

Believe it or Not - Dynamic Package Install function in Task Sequence doesn't work

by RickGates 6. February 2011 17:50

If you have an issue with a specific package not installing and in the SMSTS.Log you receive an error in the "Install Software" section:

"Policy not stored in Task Sequence Environment"

Believe it or not, all you do is delete the application package that is failing to install and re-create it.

Now your application will install properly!

Tags:

About the author

Rick Gates has been working in Enterprise Windows Deployment Solutions projects space for 15 years.  If you have any Windows deployment project needs, Rick is available for assisting with setting automated deployment processes for automating a Windows 7 desktop deployment using MDT 2010 and SCCM 20007.  Please send any inquiries to Rick.Gates@hp.com

Tag cloud