User Profile - Customize During Installation

How to Customize Default User Profile in Audit Mode

   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:
Default_User_Profile.png
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
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:
EnterAuditMode.png
In Windows 8:
2013-04-11_173058.png
After the reboot and automatic login as built-in administrator close the Sysprep dialog by clicking Cancel:
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
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="[B][COLOR=darkred][HL]amd64[/HL][/COLOR][/B]" 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="[B][COLOR=darkred][HL]wim:E:/sources/install.wim[/HL][/COLOR][/B][HL]#[B][COLOR=darkred]Windows 7 ULTIMATE[/COLOR][/B][/HL]" 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:

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:[HL]E:[/HL]\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






 
Last edited:
I appreciate your work with Sysprep and Audit Mode. I'll be doing a clean new install and changing the motherboard and CPU in another while reusing the drives.

As a note, I have changed the graphics card a few times and no reactivation was needed. Others may have different experience though.
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Home Built Desktop By DataTech
OS
Windows 7 Ultimate X64 SP1
CPU
Intel i5-2550K, Differing ~4.4-4.8GHz No built in GPU
Motherboard
ASUS P8Z68-V PRO/GEN3
Memory
16GB G.Skill Sniper 1866MHz @ 2133MHz 2x8GB
Graphics Card(s)
ASUS GTX650TIB-DC2OC-2GD5, (650TI Boost)
Sound Card
Onboard Realtek 5-1
Monitor(s) Displays
Samsung P2570HD
Screen Resolution
1920x1080
Hard Drives
Samsung 840 Pro 256GB SSD for OS, 500GB Seagate Constellation (Enterprise drive) for Data
PSU
Corsair HX650W
Case
Inwin Dragon Rider
Cooling
Hyper 212 EVO w/two Noctua fans, push-pull, @1300 RPM
Keyboard
E-Z Eyes, bright yellow keys with large characters
Mouse
steelseries SENSEI Laser Pro Gaming
Internet Speed
48-51Mbs Mbs down, 11 Mbs up Xfinity Cable
Antivirus
Norton Internet Security 2013
Browser
IE 10, Opera, Pale Moon if needed
Other Info
4 case fans, LG BluRay-RE, ASUS DVD-RW, Mr. Fusion power supply, 1.21 gigawatts.
I have set everything up through sysprep command but that does not help
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
Windows 7 Home Premium 64bit
I have set everything up through sysprep command but that does not help

Please see my response to you in your earlier thread:

I have set everything up through sysprep command but that does not help

If you follow the instructions told in that tutorial I mentioned in my first post to the letter, it sets a default home page and favorites for Internet Explorer for all future user accounts which will be created. Users can then later change these as they wish.

The instructions in the tutorial are 100% correct and valid. If you want to do this on an existing Windows installation you need to remember what I told earlier, also in my first post:

Notice that default user profile customization with Sysprep can only be done when no other user accounts exist than the Windows built-in administrator. Because of this limitation the customization should be done when installing, prior to creating any user accounts; if done later you need first reboot to Audit Mode and when there, remove all existing user accounts before using the Sysprep command.

If my tutorial is difficult to read and / or understand, you can find official Microsoft instructions in this article: http://support.microsoft.com/kb/973289/en-us

The same official Microsoft support article in Dutch here: http://support.microsoft.com/kb/973289/nl-nl

EDIT: On an existing Windows setup, you can reboot to Audit Mode by giving this command in Command Prompt or the Run dialog (WIN + R):
Code:
%windir%\system32\sysprep\sysprep.exe /audit /reboot
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Hi Kari

I am trying to make sure I understand the wim file needed for the DefaultProfile.xml file. I have an HP 840 that did not come with CDs. I retrieved the WIM files from the OS, there were 2 on a bigger file. I a stripped out Win 7 Pro basic and another a more robust business version with HP trust center and other stuff. I can put this in a folder called source on my USB drive, but not sure if that is what I need.

I have a Win 7 PRO OEM disk that I assume will have a file, but it's not the file I installed the OS from.

Can you please guide me?
 

My Computer

Computer type
Laptop
OS
Windows 7 Professional
Hi Kari

I am trying to make sure I understand the wim file needed for the DefaultProfile.xml file. I have an HP 840 that did not come with CDs. I retrieved the WIM files from the OS, there were 2 on a bigger file. I a stripped out Win 7 Pro basic and another a more robust business version with HP trust center and other stuff. I can put this in a folder called source on my USB drive, but not sure if that is what I need.

I have a Win 7 PRO OEM disk that I assume will have a file, but it's not the file I installed the OS from.

Can you please guide me?

You can use the install.wim file from your OEM disk. Insert the disk in the DVD drive before sysprepping and make your answer file (the script) to point to that file, for example if your DVD drive is drive X:, point to X:\Sources\install.wim.

Kari
 

My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP ENVY 17-1150eg
OS
Windows 10 Pro x64 EN-GB
CPU
1.6 GHz Intel Core i7-720QM Processor
Memory
6 GB
Graphics Card(s)
ATI Mobility Radeon HD 5850 Graphics
Sound Card
Beats sound system with integrated subwoofer
Monitor(s) Displays
17" laptop display, 22" LED and 32" Full HD TV through HDMI
Screen Resolution
1600*900 (1), 1920*1080 (2&3)
Hard Drives
Internal: 2 x 500 GB SATA Hard Disk Drive 7200 rpm
External: 2TB for backups, 3TB USB3 network drive for media
Cooling
As Envy runs a bit warm, I have it on a Cooler Master pad
Keyboard
Logitech diNovo Media Desktop Laser (bluetooth)
Mouse
Logitech Performance Mouse MX
Internet Speed
50/10 Mbps VDSL
Antivirus
Windows Defender 4.3.9431.0
Browser
Maxthon 3.5.2., IE11
Thanks for the quick reply

I am running into another issue. When I hit the CTRL-SHIFT-F3 the system appears to shut down, restart and I see the message "Processing Cleanup Phase Sysprep Plugins" or similar, but the computer immediately shuts down and restarts as if it were new again.

Any ideas? Some other threads indicate a fatal message which I do not see. The extracted system is brand new, never booted before.
 

My Computer

Computer type
Laptop
OS
Windows 7 Professional
Hello,

I got a few Questions:

  1. can I install Symantec Entpoint Protection Client?
  2. can I join a Domain?
  3. do I have to do a Restart after every Installation and or Driver Pack?
  4. Does the USB-Stick have to be in the USB-Port during Sysprep and Capture?
  5. can i remove the CD from the Drive during Capture?
  6. are any Windows-Updates needed?
  7. what about the User-Mode-Driver Framework?(needed)
  8. what about the Kernel-Mode-Driver Framework?(needed)

Thanks
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Pro; Windows 10 Pro
Back
Top