ZileXa Posted February 9, 2011 Share Posted February 9, 2011 (edited) I would like to try to install everything before first logon, so all programs, settings and regtweaks will be installed for all users. But also because I like the challenge unfortunately $OEM$ folder is not copied to the hard drive at this stage. Otherwise I would definitely place the cmd file in the $1 folder.It doesn't seem logical to call the install.cmd file first if the path is unknown? But I will try. I was also thinking about combining both commands, something like this:cmd /C FOR %i IN (c d e f g h i j k l m n o p q r s t u v w x y z) DO IF EXIST %i:\Sources\Install.wim START /WAIT %i:\installApps.cmdGoing to try that with %i and %%i (two seperate RunSynchronous commands). It works when I run this command from Start > Run.It worked! But I don't know wich of the two commands worked, with %i or with %%i but thats easy to figure out. Edited February 9, 2011 by ZileXa Link to comment Share on other sites More sharing options...
maxXPsoft Posted February 10, 2011 Share Posted February 10, 2011 (edited) Let us know which it is I'll update my 102I have seen oem folders appear during extracting so they are there way before even Audit. Edited February 10, 2011 by maxXPsoft Link to comment Share on other sites More sharing options...
ZileXa Posted February 20, 2011 Share Posted February 20, 2011 (edited) I have had time to spend on this project again. This is the working command (in pass Specialize, inside component Microsoft-Windows-Deployment):<RunSynchronous> <RunSynchronousCommand wcm:action="add"> <Order>1</Order> <Description>Set CDROM Variable</Description> <Path>cmd /C FOR %i IN (c d e f g h i j k l m n o p q r s t u v w x y z) DO IF EXIST %i:\Sources\Install.wim START /WAIT %i:\installApps.cmd</Path> </RunSynchronousCommand></RunSynchronous>Unfortunately 2 things:Not all of my registrytweaks from a .reg file started via InstallApp.cmd have been imported (I think those are the HKCU ones that I want to import for all future users).there are 3 applications that cannot be installed: Office 2010 rolls back during install, Paint.Net also rolls back during install. Avira Antivir shows a message about Windows update running. Office 2010 and Paint.net might have something to do with admin rights.. but all other apps install fine.I have figured out why the contents of $OEM$\$1 wasn't copied to the harddrive. I had to place $OEM$ inside the Sources folder instead of the root of my DVD. I have now also added a FirstLogonCommands command to my autounattend in an attempt to apply the HKCU tweaks. but they will only be applied to the current logged in user. And if I create 2 other users later, the tweaks will not have been applied to them So thats still an issue. Edited February 20, 2011 by ZileXa Link to comment Share on other sites More sharing options...
maxXPsoft Posted February 21, 2011 Share Posted February 21, 2011 (edited) I have had time to spend on this project again. This is the working command (in pass Specialize, inside component Microsoft-Windows-Deployment):Cannot install Applications during Specialize. You must use Audit Mode or OObesystemDuring the specialize configuration pass of Microsoft® Windows® Setup, machine-specific information for the image is applied. For example, you can configure network settings, international settings, and domain information.Reg tweaks applied during specialize can only be machine specific like HKLMCommands in the Setupcomplete.cmd file are executed with local system privilege.HKLM Reg tweaks can be ran here but not HKCU which are user specific.HKCU can be done during FirstlogoncommandsUnattend.chm is your friend here and will explain a lot of this Edited February 21, 2011 by maxXPsoft Link to comment Share on other sites More sharing options...
ZileXa Posted February 21, 2011 Share Posted February 21, 2011 (edited) I have had time to spend on this project again. This is the working command (in pass Specialize, inside component Microsoft-Windows-Deployment):Cannot install Applications during Specialize. You must use Audit Mode or OObesystemDuring the specialize configuration pass of Microsoft® Windows® Setup, machine-specific information for the image is applied. For example, you can configure network settings, international settings, and domain information.Reg tweaks applied during specialize can only be machine specific like HKLMCommands in the Setupcomplete.cmd file are executed with local system privilege.HKLM Reg tweaks can be ran here but not HKCU which are user specific.HKCU can be done during FirstlogoncommandsUnattend.chm is your friend here and will explain a lot of thisThanks I will do more reading. I have also done my first tests with Firstlogoncommands. But HKCU will then only apply for the user currently logged in. Not for users created in the future. So I should create something like RunOnce that will run for all future users. Btw I am installing 20+ other apps just fine during Specialize.. perhaps they don't require a high permissions level. I prefer doing it "right" so I will do some more reading first!edit:Audit mode enables OEMs and corporations to install additional device drivers, applications, and other updates to a master Windows® image. Additionally, you can test the installation before shipping the computer to an end-user. and The auditSystem configuration pass processes unattended Windows Setup settings in system context in audit mode. The auditSystem configuration pass runs immediately before the auditUser Configuration Pass configuration pass, which is used to apply settings in user context. and Typically, the auditUser configuration pass is used to execute RunSynchronous or RunAsynchronous commands. These commands are used to run scripts, applications, or other executables during audit mode.So both auditSystem and auditUser in the can be used to install both apps and registrytweaks, since OEMs will use it even to install drivers. But the last quote shows it is recommended to do this during auditUser pass.woops. no I was wrong, auditSystem is the correct one:In auditSystem, the built-in administrator account is enabled by the system, and after logging into the system, the built-in administrator account is disabled during auditUser. This enables you to use audit mode with administrator privileges, but the next time the computer shuts down, the built-in administrator account will continue to be disabled. For more information, see Enable and Disable the Built-in Administrator Account. Edited February 21, 2011 by ZileXa Link to comment Share on other sites More sharing options...
maxXPsoft Posted February 21, 2011 Share Posted February 21, 2011 (edited) If you do Audit you will need both because Auditsystem load's Audituser passThats a good way of doing everything. When it reboots into oobe all is doneEdit: Only problem is some apps install only for current userI do office 2007 with an xml and allupdates in the Updates folderREG ADD %KEY%\iAdd /V Inum /D "CMD /C Start /Wait %SystemDrive%\APPS\MS_Office_Enterprise_2007\setup.exe /config custom-uA.XML" /f Edited February 21, 2011 by maxXPsoft Link to comment Share on other sites More sharing options...
ZileXa Posted February 21, 2011 Share Posted February 21, 2011 Ok then I better use AuditSystem. I do Office2010 in a similar way, with an XML file and also with the updates in Updates folder. Link to comment Share on other sites More sharing options...
ZileXa Posted February 21, 2011 Share Posted February 21, 2011 (edited) Ok I have read some more and have to come to the conclusion both AuditSystem and AuditUser is not the way I want to do it.AuditSystem and Audituser do not start automatically during setup, you have to use a unattended setup setting (reseal). Wich is fine, but the goal of AuditSystem and AuditUser is to create a preconfigured Windows Setup. This means, if I want to update my ISO with a new version of Ccleaner, Firefox, Office, Antivirus oetc I cannot simply copy the newer .exe setup files to my ISO, I will have to run Windows Setup in Audit Mode again to do this. Also if I have a few extra regtweaks I would have to go all over Windows Setup again.This is exactly what I do not want to do!So I decided to keep things the way they are:1. install apps during Specialize2. the apps that cannot be installed will be installed via RunOnce or similar (Office2010 and Paint.net).3a. regtweaks.reg will be applied during Specialize but most wont work (HKCU). therefore regtweaks.reg will also be applied during RunOnce (run every time a new user logs in).OR3b. I just found this trick, wich should work also from Specialize or just via SetupComplete.cmd::: Load the default profile hiveREG LOAD HKU\Hive C:\Users\Default\NTUSER.DAT:: Configure the default user profilestart /wait regedit.exe /s Regtweaks.reg:: Unload the default profile hiveREG UNLOAD HKU\HiveThis way, if I want to:update the apps in my ISO, all I have to do is overwrite firefoxsetup.exe for the new one.add/replace regtweaks, all I have to do is edit the existing regtweaks.reg. Edited February 21, 2011 by ZileXa Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now