Apply regtweaks (also HKCU) and install apps for ALL users How to do this just as simple and easy as WinXP? (run RunOnceEx @ T13)
#21
Posted 17 March 2011 - 08:06 PM
http://win-lite.de/w...0-0-4-0-7-beta/
Its a german addon integrator for Win7 that is roughly translated in English but does EXACTLY what you require.
I too am very much in your shoes in that I was deeply embedded in the methods of tailoring an unattended XP installation source, and as we all know, the movent lost a TON of steam since vista and still takes a lot of digging to get to the same functionality for Win7 UA installs.
Perhaps I'm lazy and just am in a permanent state of TL;DR - but to hell with mounting WIMs in and every darn time just add an app! BAH!
This little critter inserts addons to your install source in a separate addon folder, which you can then easily replace switchless installers with the latest ones (use the same exe name). My question is how do you do this process manually? I probably waited years for a utility like this...
#22
Posted 18 March 2011 - 09:07 PM
#23
Posted 19 March 2011 - 06:33 AM
You have to load a user to apply User tweaks. OK
You cannot apply HKCU except
1. mounting image and applying to defaults.dat. I found some I wanted would not apply doing that so went back to #2
2. use a reg file during Firstlogoncommands and these are applied before desktop loads
3. Run a script for each user which he said he was going to do
I am sure there are a couple more way's with policies but even those don't get all I want and other such but #2 is easiest for me.
This post has been edited by maxXPsoft: 19 March 2011 - 06:34 AM
#24
Posted 27 March 2011 - 02:07 PM
the Firstlogoncommands is for all the users and the future users or only for the current user who you have done the unattended installation.
#25
Posted 27 March 2011 - 03:06 PM
Major, on 27 March 2011 - 02:07 PM, said:
the Firstlogoncommands is for all the users and the future users or only for the current user who you have done the unattended installation.
Yes that is why I said #2 works best for me. Have been doing this since first Vista beta.
The FirstLogonCommands setting specifies commands to run the first time a user logs on to the computer. These commands run only once.
This post has been edited by maxXPsoft: 27 March 2011 - 03:12 PM
#26
Posted 30 March 2011 - 08:59 PM
#27
Posted 31 March 2011 - 06:58 PM
neuropass, on 30 March 2011 - 08:59 PM, said:
Not everybody going to run as built in Administrator and the majority should not.
try to merge this reg file. Administrator account can't even merge this without setting permissions. Do you feel less powerful now?
[HKEY_CLASSES_ROOT\CLSID\{323CA680-C24D-4099-B94D-446DD2D7249E}\ShellFolder]
"Attributes"=dword:a9400100
; Default is a0900100
TrustedInstaller has full permissions on that but Administrators group which Administrator belongs to does not
with UAC off I can do anything the Administrator can do.
#28
Posted 04 April 2011 - 12:09 AM
To summarize,
You will need two copies of your unattended file, these two files only need to differ by one setting. AutoUnattend.xml will have this line, second file (UnattendedOOBE.xml for remainder of this discussion) does not have this setting. I usually setup autounattend.xml and as a last step before copying to usb key create the UnattendedOOBE.xml from the autounattend.xml
<settings pass="oobeSystem">
<component name="Microsoft-Windows-Deployment">
<Reseal>
<Mode>Audit</Mode>
</Reseal>
</component>
</settings>
This will cause setup to boot into sysprep mode.
You need to put a command to run during auditUser that will , generalize, capture the image, reboot the system back into OOBE and have it use UnattendedOOBE.xml config instead of autounattend.xml. This needs to be the very last command executed (as the system reboots afterwards).
<settings pass="auditUser">
<component name="Microsoft-Windows-Deployment">
<RunSynchronous>
<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>
During sysprep mode, system will be running as administrative user, to make those settings apply to the default user profile you need to put a setting into specialize pass
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup">
<CopyProfile>true</CopyProfile>
</component>
</settings>
To get the %DVDRoot% I just search the drive letters looking for the UnattendedOOBE.xml file in the root directory: (I run this command both in auditUser and specialize passes but i'm not sure whether that's really necessary)
<RunSynchronousCommand wcm:action="add">
<Order>497</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: -m"</Path>
<Description>Set Path For DVD</Description>
</RunSynchronousCommand>
Other things to note:
- After making changes to the wim (e.g after mount / unmount commit) files, you need to open it up in WSIM and let it rebuild the indexes or whatever, it feels a lot like black-magic but this has fixed several of my problems with rebooting the system using UnattendedOOBE.xml
- Registry tweaks are applied through .reg files during auditUser pass running command: REGEDIT /s C:\MyRegistryTweaks.reg
- Installing apps during auditUser means those apps are available to any account in the system...
Hopefully i captured all the relevant steps here, you can refer to the firegeier guide if you run into any issues though.
#29
Posted 04 April 2011 - 06:45 AM
Quote
The built-in administrator account profile is deleted and recreated when you perform a clean Windows installation, or run the Sysprep tool. The CopyProfile setting is processed before the built-in administrator account is deleted, so any customizations that you make should appear in new user account profiles, including the new built-in administrator account profile.
#30
Posted 06 April 2011 - 07:30 PM
Quote
I want to be able to just replace the FF4 beta installer with the FF4 final installer. Done, finished, nothing extras. Not even modify the batch file or xml that executes the installers or whatever since all I have to do is make sure the setup filename is still the same.
This is the way I could do it for winXP and I'm looking for a similar method for Win7. Without having to create a personalized image to capture everytime I want to update my Win7 setup DVD.
I got the impression he believed audit mode was a manual process as is suggested by most of the tutorials on tech republic. Using copy profile as described, audit mode is applied inline during installation and is completely unattended. You can throw your apps on your dvd / usb stick and install your apps directly from there without changing the unattended process at all.
It is the equivalent of the old windows XP procedure.
This post has been edited by SmokingRope: 06 April 2011 - 07:32 PM
#31
Posted 07 April 2011 - 04:06 AM
<settings pass="specialize">
<component name="Microsoft-Windows-Shell-Setup">
<CopyProfile>true</CopyProfile>
</component>
</settings>
This post has been edited by Major: 07 April 2011 - 04:10 AM
#32
Posted 07 April 2011 - 04:42 PM
http://technet.micro...318(WS.10).aspx
#33
Posted 09 April 2011 - 07:05 AM
I have 1 unattend.xml and I install my software via setupcomplete.cmd (because Office 2010 x64 and Paint.net cannot be installed earlier, they will fail).
If I understand your process correct, it should go like this:
1. Windows setup starts with AutoUnattend.xml. This file contains the settingspass OobeSystem + settingspass auditUser + settings pass Specialise lines from your post. Setup will boot into sysprep.
2. in sysprep, what happens now? Is input from the user required?
I think this is what I should do: add a command to auditUser that will run my regtweaks, install apps, cleanup startmenu. This command should run first, your auditUser command to generalize should run last.
Is this correct?
3. after your auditUser command has run, system will reboot again and continue normally using the 2nd xml file. this file does NOT contain your Oobesystem/audituser/specialise lines. Is this Correct?
4. I do not understand how your note about "changes to WIM" is related to the process. I am not changing WIM or anything. I just want to apply my regtweaks for all users.
#34
Posted 10 April 2011 - 10:39 AM
1) windows PE
2) oobeSystem (reboot here)
3) specialize
4) audit user (reboot here - from last command)
5) oobeSystem again with UnattendedOOBE.xml
During auditUser the environment is setup, and programs can run just like they would after setup is finished. Input *could* be provided during auditUser pass but if you set up command-lines right then no input is necessary.
You just have to remove a few lines from UnattendedOOBE.xml (the reseal part) - process reboots from auditUser directly into OOBESystem step so it doesn't matter what you have in the other passes.
<Reseal>
<Mode>Audit</Mode>
</Reseal>
As for the note about the WIM, i can't say that it will affect you but it has caused a lot of headaches for me while doing this. I always slipstream hotfixes and put the applications i am installing in the WIM and if you don't rebuild the index (or whatever it's called, haven't done it recently) then during setup, sysPrep fails to load the UnattendedOOBE.xml and you end up having to click through the boxes in step #5 above and registry settings are not applied because *generalize* didn't take place. It takes an hour to get to this point inside a virtual machine so it's a pain to debug / test (I probably have wasted days on the issue). The actual solution was found serendipitously and the only thing i know is that it seems to work.
EDIT:
Rebuilding the WIM: it might be helpful to grab the error codes from the UnattendedGC.log / Panther.log files and put them in this thread somewhere for search engines to pickup. Will see about doing this if I have time.
This post has been edited by SmokingRope: 10 April 2011 - 10:45 AM
#35
Posted 10 April 2011 - 09:56 PM
SmokingRope, on 10 April 2011 - 10:39 AM, said:
1) windows PE
2) oobeSystem (reboot here)
3) specialize
4) audit user (reboot here - from last command)
5) oobeSystem again with UnattendedOOBE.xml
where did you get that? I suggest you look at unattend.chm
depending on what you have added
passes.PNG (19.17K)
Number of downloads: 7
#36
Posted 15 April 2011 - 12:08 PM
what you need to do is put a folder called like Apps, inside your image, with the program installers, and use SetupComplete.CMD, to install the exe's
#37
Posted 16 April 2011 - 04:42 AM
Quote
HKLM Reg tweaks can be ran here but not HKCU which are user specific.
Try running Windows Calendar(WinCal-Win7-amd64-en-us.exe) or WinPinball-en-us.exe in setupcomplete and they fail. Why? Because a user is not yet created. That run's right before Login screen. Why do I set login? To observe when things are actually happening I get a better picture.
I will try those in Firstlogoncommands next but that starts after you login and GUI is loading = User Created
#38
Posted 18 April 2011 - 03:23 PM
Since I now finally have a stable stripped down Win7 x64 Ultimate image without WinSxS I am going to test SmokingRope's method
This post has been edited by ZileXa: 18 April 2011 - 03:23 PM
#39
Posted 18 April 2011 - 03:52 PM
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).
This post has been edited by ZileXa: 18 April 2011 - 04:49 PM
#40
Posted 19 April 2011 - 05:12 PM
This post has been edited by SmokingRope: 19 April 2011 - 05:16 PM
- ← What is the smalest Windows 7 Edition ?
- Unattended Windows 7/Server 2008R2
- can you get updates for win7 →



Help
Back to top









