Code:
<component name="Microsoft-Windows-Deployment" 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">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>reg import c:\RegFile.reg</Path>
<Description>Import Reg File</Description>
<WillReboot>Never</WillReboot>
</RunSynchronousCommand>
</RunSynchronous>
</component> Or
Code:
<component name="Microsoft-Windows-Deployment" 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">
<RunAsynchronous>
<RunAsynchronousCommand wcm:action="add">
<Order>1</Order>
<Path>reg import c:\RegFile.reg</Path>
<Description>Import Reg File</Description>
</RunAsynchronousCommand>
</RunAsynchronous>
</component> Need to change the bold text, the order controls the order if you are running more than one command. Will Reboot can be Always, Never or If Required, I think.
These will work from the "windowsPE", "specialize" or the "auditUser" passes I believe, depending on the reg files to where you will run them from but I would recommend the "oobeSystem". HKCU tweaks should probably not be ran any earlier as no account is set up other than the built in Admin which I believe is deleted or restored to it's default state after the audit passes are completed, unless you create a account during an ealier pass which then I don't know if it'll work or not.
For the "oobeSystem" pass you need to use
Code:
<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">
<FirstLogonCommands>
<SynchronousCommand wcm:action="add">
<Order>1</Order>
<CommandLine>reg import c:\RegFile.reg</CommandLine>
<Description>Import Reg File</Description>
</SynchronousCommand>
</FirstLogonCommands>
</component> RunSynchronousCommand's must be enclosed between <RunSynchronous> and </RunSynchronous> but you can run as many "RunSynchronousCommand" as you like or run a single batch file, whichever is easiest. Same goes with RunAsynchronousCommand's. For oobe SynchronousCommand's they must between <FirstLogonCommands> and </FirstLogonCommands> but again run as many as you like. Another words there should only be one open and close <RunSynchronous>, <RunAsynchronous> and <FirstLogonCommands> per pass but there can be as many as you like of "RunSynchronousCommand", "RunAsynchronousCommand" and "SynchronousCommand" between them.
There's some restrictions on the passes things can run during and all my info may not be accurate as it has been a while since I created my unattended file so I would recommend downloading the
Windows® Automated Installation Kit (AIK) for Windows® 7 which includes Windows System Image Manager and documentation that has all the settings, restrictions and help you should need.
Or at least download just the documentation -
Download Windows AIK for Windows 7 documentation (May 2010 update) from Official Microsoft Download Center