I am trying to add HKCU entries related to "Action Center Settings". These entries are per user entries and I want to make for all users. I tried to add it according to method given below.
Please see my code attached.
<settings pass="auditUser">
<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">
<Description>HKCU Entries</Description>
<Order>1</Order>
<Path>CMD.EXE /C C:\AC.cmd</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
Before capturing WIM file: I copy AC.cmd file(which contains execution of HKCU reg) to C drive. I have even set COPYPROFILE=TRUE. then I run sysprep and capture .WIM file. I don't see HKCU entries after applying this .WIM file. Please help. I am doing all these at least from a month. Please help!!
ZileXa, on 18 April 2011 - 03:52 PM, said:
1. AutoUnattend.xml will be used first by Windows Setup.
2. By using this command, Setup reboots into Sysprep mode and AutoUnattend.xml is still being used by setup after the reboot
(this was where you lost me, I thought UnattendOOBE.xml kicked in after this reboot, thats not the case):
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Deployment">
<Reseal>
<Mode>Audit</Mode>
</Reseal>
</component>
</settings>
3. Also, this code is needed to make sure everything that happens after the above mentioned reboot-into-sysprep will be copied to the defaultprofile:
<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" /> <component name="Microsoft-Windows-Security-Licensing-SLC-UX" 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"> <SkipAutoActivation>true</SkipAutoActivation> </component> <component name="Microsoft-Windows-Shell-Setup"> <CopyProfile>true</CopyProfile </component> </settings>
4. So Setup has rebooted and is in sysprep state. Setup will now look at settings pass auditUser and perform the commands there (Setup is still reading AutoUnattend.xml):
<settings pass="auditUser">
<component name="Microsoft-Windows-Deployment">
<RunSynchronous>
<RunSynchronousCommand wcm:action="add">
<Order>490</Order>
<Path>cmd /c "FOR %i IN (C D E F G H I J K L N M O P Q R S T U V W X Y Z) DO IF EXIST %i:\UnattendedOOBE.xml SETX DVDRoot %i:"</Path>
<Description>Set Path For DVD</Description>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>495</Order>
<Description>Install apps and HKCU + HKLM regtweaks</Description>
<Path>cmd /c %DVDRoot%\InstallAppsTweaks.cmd</Path>
</RunSynchronousCommand>
<RunSynchronousCommand wcm:action="add">
<Order>500</Order>
<Description>Reboot into OOBE With Unattend lacking reseal</Description>
<Path>C:\Windows\system32\sysprep\sysprep.exe /quiet /oobe /reboot /generalize /unattend:%DVDRoot%\UnattendedOOBE.xml</Path>
</RunSynchronousCommand>
</RunSynchronous>
</component>
</settings>
5. Note the final command in the code above, Setup will reboot again. After reboot Setup will no longer use AutoUnattend.xml. Instead UnattendedOOBE.xml is used.
UnattendedOOBE.xml is an exact copy of AutoUnattend.xml but it misses the code from step (1) therefore, the code in step (4) is completely ignored.
--> Is this correct?
--> Is it safe to leave the code from step 3 in UnattendedOOBE.xml? Since it's a copy of AutoUnattend minus the code in step (1).
--> I still wonder how and when everything is copied to the default user since you reboot again at the end of step (4), not giving the system any chance to copy everything to the default profile!
(edit: btw I am NOT modifying WIM before I create my ISO image. All the setupfiles/installers of my apps are in %dvdroot%\Apps and I use a .cmd file to install them silently, clean up start menu, copy predefined startmenu, add pins to taskbar/startmenu and run a regtweaks.reg file). So I rebuilding indexes doesnt apply here.)
Please note before replying this post has completely been modified (I tend to read a message in my mail, come to the forum and immediately start my response without noticing changes to the post I am replying to).



Help
Back to top










