Sysprep and Default Profile modification in Windows 7

Z DCEwiki
Skočit na navigaci Skočit na vyhledávání

This short notes describes how to provide changes in the Default User profile before imaging and distribution of the OS.

Upozornění Anti-virus software like ESET Smart Security must not be installed before Sysprep process, because it breaks boot of the system after that. Applied Local User Policies will be discarded by Sysprep process.


Sysprep executable resides in C:\Windows\system32\Sysprep folder.

# sysprep /generalize /oobe /unattend:"c:\scripts\Unattend.xml"


Example of the Unattend.xml file, which can be created in The Windows Automation Installation Kit

<?xml version="1.0" encoding="utf-8"?> 
<unattend xmlns="urn:schemas-microsoft-com:unattend"> 
	<settings pass="specialize"> 
		<component name="Microsoft-Windows-Shell-Setup" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" processorArchitecture="amd64">
			<CopyProfile>true</CopyProfile> 
		</component> 
	</settings> 
	<cpi:offlineImage cpi:source="catalog:c:\flat\install_windows 7 enterprise.clg" xmlns:cpi="urn:schemas-microsoft-com:cpi" /> 
</unattend>


<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
       <settings pass="specialize">
                <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>
                </component>
       </settings>
       <cpi:offlineImage cpi:source="wim://<computerName>/g$sources/install.wim#Windows 7 ENTERPRISE" xmlns:cpi="urn:schemas-microsoft-com:cpi" />
</unattend>