Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: User Profile - Customize During Installation



User Profile - Customize During Installation

How to Customize Default User Profile in Audit Mode
Published by Kari
11 Apr 2013
Published by

How to Customize Default User Profile in Audit Mode

Note   Note
Audit Mode is a very practical way to prepare and customize Windows. This tutorial will show you how to enter Audit Mode to customize the default user profile during the installation of Vista, Windows 7, or Windows 8.

If you have used Windows already you might have noticed that the main user profile folder (default location C:\Users) not only contains individual folders for each user of the PC as for instance C:\Users\Kari, but also a hidden user folder called Default:
Name:  Default_User_Profile.png
Views: 7700
Size:  16.1 KB
When a new user account is created and the user logs in first time, Windows creates the basic set of personal folders (Pictures, Videos, Documents, Favorites etc.) under the user profile folder which is a first level subfolder in the main user profile folder. The default location is as mentioned C:\Users. For instance my personal profile folder would be by default at C:\Users\Kari and my Documents folder at C:\Users\Kari\Documents.

In addition to these standard, default folders and settings system looks now the Default User Profile folder to copy all customized settings to newly created user folder. These can include display and desktop settings, IE favorites, saved searches and so on.

Customizing the Default User Profile in Audit Mode using Windows System Preparation Tool (Sysprep) is only possible if no user accounts except the built-in administrator account exist, hence using this method is only practical when installing Windows and entering Audit Mode during the installation.

If however you want to use this method on an already running Windows setup it is possible. You need to boot to Audit Mode which automatically uses the built-in administrator account, then delete all existing user accounts before proceeding. This is really important so I repeat: You cannot use this method to modify Default User Profile if any user accounts exist!

To boot to Audit Mode from existing Windows setup, close all applications and Explorer windows, press CTRL + R to open the Run dialog, type %windir%\system32\sysprep\sysprep.exe /audit /reboot and hit Enter. Notice that when this method is used on an existing Windows installation, you need to have your product key ready as you need to reactivate the Windows after exiting Audit Mode and returning to normal (OOBE) mode.




This tutorial takes you through following steps:
  1. Installing Windows and entering Audit Mode during first boot after the installation
  2. Customizing Default User Profile in Audit Mode
  3. Running System Preparation Tool to save modified Default User Profile
  4. Booting Windows normally to Windows Welcome (OOBE) to finalize installation
This method is valid for Windows Vista, Windows 7 and Windows 8.

warning   Warning
Notice that as an upgraded Windows cannot be sysprepped and as a so called repair install is also considered as an upgrade (in-place to same edition), this method only works on cleanly installed Windows 7 and 8. When using this method on an existing Windows setup, it only works if the Windows was installed clean and has never been repaired using repair install.






Step 1:
Install Windows


Start Windows installation normally. Consult the respective tutorials if you need any help:At the end phase of the installation when Windows 7 asks your initial user name and Windows 8 starts the Personalization phase, do not enter a username or a computer name but instead press CTRL + SHIFT + F3 to make Windows to reboot to Audit Mode:

In Vista and Windows 7:
User Profile - Customize During Installation-enterauditmode.png
In Windows 8:
User Profile - Customize During Installation-2013-04-11_173058.png
After the reboot and automatic login as built-in administrator close the Sysprep dialog by clicking Cancel:
User Profile - Customize During Installation-closesysprep.png



Step 2:
Customize Default User Profile


Install the applications you want to be ready for all users, do not install software that you want to install only for you. Create and edit IE favorites as you wish, or install another browser and set favorites and homepage to it. Modify desktop settings, wallpaper and colors, delete and add shortcuts, make the desktop and your Windows as you would like every new user account to have it.

Note   Note
Notice that pinned Taskbar items cannot be set now. Pinning simply does not survive the sysprep process.


When you have the Default User Profile set as you wish, open Windows Notepad and type or Copy / Paste following lines to a new document:

Code:
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
    <settings pass="specialize">
        <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="amd64" 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>
        </component>
    </settings>
    <cpi:offlineImage cpi:source="wim:E:/sources/install.wim#Windows 7 ULTIMATE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>
Notice the two highlighted values in above answer file script:
  • Line 4 > The value of the variable ProcessorArchitecture must be amd64 if you are installing a 64 bit Windows (even on Intel processors) and x86 if you are installing a 32 bit Windows
  • Line 8 > The value of cpi:source must be as follows:
    • Path to install.wim file on your install media followed by # and the exact Windows version and edition. The original install media containing install.wim file must be on a drive when you sysprep the system later in Step 3
    • The install.wim is by default located in Sources folder > if the install DVD is on drive D: the path is D:\Sources\install.wim. Also important is to notice that whereas you normally would use the backslash (\) as folder separator in paths (D:\Sources\install.wim), the XML syntax uses slashes instead (D:/Sources/install.wim)
    • The version and edition information with capital letters as follows:
      • WINDOWS 7 HOMEPREMIUM
      • WINDOWS 7 PROFESSIONAL
      • WINDOWS 7 ULTIMATE
      • WINDOWS 7 ENTERPRISE
      • WINDOWS 8
      • WINDOWS 8 PRO
      • WINDOWS 8 ENTERPRISE
      • WINDOWS 8.1
      • WINDOWS 8.1 PRO
      • WINDOWS 8.1 ENTERPRISE
This answer file must be saved as an XML file on the root of an external media like for instance a USB stick. To do this, insert the media, select Save As from Notepad's File menu, select Save As Type as All Files, name the file as DefaultProfile.xml and save it:

User Profile - Customize During Installation-saveas.png




Step 3:
Sysprep Windows


Put the original Windows install media on drive, insert the USB stick where the answer file is saved.

Open an elevated command prompt and type this:
Code:
%windir%\system32\sysprep\sysprep.exe /generalize /oobe /reboot /unattend:E:\DefaultProfile.xml
Change the drive letter (highlighted above) accordingly so it points to your USB stick where the DefaultProfile.xml is saved. If you are preparing a Windows image to be captured for deployment, change the /reboot switch to /shutdown. Press Enter to start the sysprep process.

When Sysprep is ready, Windows boots normally and continues the last phase of installation you interrupted by booting to the Audit Mode. Alternatively if the /shutdown switch was used Windows shuts down allowing the image to be captured. Your Default User Profile will now be used when you create new user accounts.

Have Fun!

Kari






.

12 May 2013   #1
jero

Windows 7 Ultimate x64
 
 
Spell WINDOWS or Windows?

Thank you very much for this tutorial!
It looks great! I will try this right now!

But first I would like to ask a question,

In the second to last line of the script, is the spelling
Windows ULTIMATE
or
WINDOWS ULTIMATE ?

...or are both spellings Windows / WINDOWS accepted?

My System SpecsSystem Spec
.

12 May 2013   #2
Kari

Microsoft Community Contributor Award Recipient

Windows 8.1 Pro with Media Center
 
 

Hi Jero, welcome to the Seven Forums.

It's the same.

I just use the same way to write it as all Microsoft documentation for sysprep, Windows Vista, Windows 7 or Windows 8 with capital W and edition with all capital letters, so in this case it would be Windows 7 ULTIMATE.

Kari
My System SpecsSystem Spec
02 Jul 2013   #3
nonosto

Windows 7 Ultimate x64
 
 

Thanks Kari for your excellent work.

In installation, CTRL + SHIFT + F3 dont work. I have an Pavilion DV6 HP. I Have already the same problem with an another HP with Win 8, but I can do it with the prompt command admin, but doesnot work on Win 7.

Any idea?

Thank you
My System SpecsSystem Spec
03 Jul 2013   #4
Kari

Microsoft Community Contributor Award Recipient

Windows 8.1 Pro with Media Center
 
 

Quote   Quote: Originally Posted by nonosto View Post
Thanks Kari for your excellent work.

In installation, CTRL + SHIFT + F3 dont work. I have an Pavilion DV6 HP. I Have already the same problem with an another HP with Win 8, but I can do it with the prompt command admin, but doesnot work on Win 7.

Any idea?

Thank you

Hi Nonosto, welcome to the Seven Forums.

CTRL + SHIFT + F3 works on every computer. HP Pavilion DV6 is a laptop with special functions programmed to F keys so the only reason why it would not work for you is that you laptop is set to use HP's own special functions when an F (function) key is pressed, and normal F key functions only when the Fn key is pressed simultaneously with an F key.

The Fn key is located right from the left CTRL key. You can select how it works from BIOS: either normal functions for F keys when an F key is pressed alone, and HP's special functions (contrast, brightness, volume etc.) when an F key is pressed together with the Fn key, or vice versa as it seems to be in your case.

In your case this means you need to press one extra key (Fn + CTRL + SHIFT + F3), or change the behaviour of the function keys in BIOS.

Kari
My System SpecsSystem Spec
03 Jul 2013   #5
nonosto

Windows 7 Ultimate x64
 
 

Thank you Kari

Works fine
My System SpecsSystem Spec
15 Jul 2013   #6
FrancisL

Windows 8 Pro 64 bit
 
 

Thank you for this tutorial that is exactly what I was looking for. However it doesn't work for me. I have just tried to apply the procedure several times to a Windows 8 pro 64 bit system without any success. No errors at all, but no customization survive the process (a desktop shortcut to a file, several customizations in the control panel). I have started from an existing system from which I have removed the user accounts (and deleted their directories) as soon the PC was in audit mode.
My System SpecsSystem Spec
15 Jul 2013   #7
Kari

Microsoft Community Contributor Award Recipient

Windows 8.1 Pro with Media Center
 
 

Hi Francis, welcome to the Seven Forums.

That has happened to me, too, with an existing installation. The thing is there's so many pointers to existing user accounts in register not deleted by deleting the accounts themselves. I have succeeded a few times by doing this:
  • Boot to Audit Mode
  • Select Cancel to close the Sysprep dialog
  • Delete all existing user accounts
  • Reboot (when rebooting from Audit Mode, PC returns automatically to Audit Mode)
  • Select Cancel to close the Sysprep dialog
  • Delete all folders of the deleted user accounts, including the user profile folders themselves. Do no delete Default and Administrator folders!
  • Reboot
  • Select Cancel to close the Sysprep dialog
  • Do your customization, run sysprep with a simple answer file including only the CopyProfile variable, exactly as told in tutorial. Do not add any other configuration passes to answer file; if you need to sysprep / change some other variables, do it after another reboot to Audit Mode
Plan B, the worst case scenario: With a clean install booted to Audit Mode before any user accounts are created, this method works like a charm.

Kari
My System SpecsSystem Spec
16 Jul 2013   #8
FrancisL

Windows 8 Pro 64 bit
 
 

Hello Kari,

Actually, I also have tried to reboot after having deleted the user accounts and the profile folders. Maybe I should have deleted the folders after the rebootÖ I donít want to spend more time in experiments; Iíll go to your "plan B" directly. Here are a few more questions and remarks.

During the customization in audit mode:
- I suppose I should not install any software that create a user account (like Acronis Backup and Recovery and ESET antivirus).
- Is there no restriction to what can be safely made? Iím thinking especially at: - Applying Windows and drivers update. - Removing the lock screen - Installing Classic Shell. - Uninstalling or removing all the apps (including Windows Store). - Changing the CD-ROM drive letter.

At the end of this phase in audit mode, I plan to make an image of the disk, booting on a CD in order to possibly continue the customization later on another similar PC. BTW, Acronis BR 11.5 doesnít work on the PC on which Iím currently working (a Fujitsu Q510), Paragon Hard Disk Manager Pro and StorageCraft do.
My System SpecsSystem Spec
16 Jul 2013   #9
Kari

Microsoft Community Contributor Award Recipient

Windows 8.1 Pro with Media Center
 
 

Any in Audit Mode installed app that creates a user account (like those you mentioned) makes CopyProfile to fail. It's simple: CopyProfile only works when absolutely no other user profiles exist than the native built-in administrator. Sorry but there's no workaround for this, at least nothing I know.

In my previous post I recommended for you to run sysprep answer file with only the CopyProfile tags, no other configuration passes, and then return to Audit Mode for additional sysprepping. This becomes especially important if you want to modify the Windows Shell; speaking only from own experience, every third party Shell modification increases the risk for sysprep to fail, especially the CopyProfile thing.

This is the method I recommend you to follow. It's a bit more work but IMO it's your best shot. Read the note though at the end of this post before proceeding:
  • First time in Audit Mode, do only the modifications to default profile that do not need any third party software or drivers (IE favorites, theme, wallpaper, desktop shortcuts, drive letters etc.). You can also run Windows Update a few times to install as much of Windows updates and drivers as possible. If and when WU asks for a reboot let Windows do it, rebooting from Audit Mode always returns to Audit Mode
  • Run sysprep with simple answer file as shown in tutorial, only with CopyProfile tags. Change the sysprep command switch /oobe to /audit to reboot back to Audit Mode instead of the OOBE / Welcome boot
  • Now do the third party modifications like installing the Classic Shell and so on, remove the Windows Apps. I do not recommend removing Windows Store as it is an essential part of Windows 8, I have some bad experience toying with it
  • Sysprep again with simple CopyProfile answer file, now rebooting to OOBE

Notice that when creating a new Microsoft Account in Windows 8 the default profile only works partially; for instance, as you certainly know, the Microsoft Account by default uses the lock screen background, desktop wallpaper, theme, Taskbar size and location etc. set for this Microsoft Account on other Windows 8 computers. In other words, using the default settings, if the Microsoft Account is already set up on another Windows 8 PC, the account settings will override some default profile settings.

Note   Note
When Sysprep is run in Audit Mode, it only prepares the system to be sysprepped when user finally boots to OOBE / Welcome mode first time. As the method described above does this preparation, then returns to Audit Mode for additional modifications, the sysprep itself is not done, it's only prepared. The second sysprep run with third party shell modifications in default profile might cause the whole process not to work. However, as any third party shell modification adds the risk of failing the sysprep this is the method I recommend.


Kari
My System SpecsSystem Spec
Comment

 User Profile - Customize During Installation




Tutorial Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd

All times are GMT -5. The time now is 06:21 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33