ZileXa Posted February 1, 2011 Posted February 1, 2011 (edited) if you want to skip reading, go to post #39 were the current subject of this topic starts. From 2004 till 2007 or so, I've been very active on the whole unattended thing, slimming down XP while maintaining all consumer related functionality. Installing lots of apps automatically, creating silent installers, autoit stuff. I wanted a disc that was easily updated (for example, just copy the latest firefoxsetup.exe to the InstallApps folder).Now I am going to switch to Win7, I want to do the same. I do not want to create a WIM image first!! Because I want to be able to just drop new version of installers (Office, Firefox, Java etc) in a folder in the root of the win7setup disc and burn that to a dvd or USB to have a new version of my Win7_uA.With XP it was simple, create a RunOnceEx.cmd file with all the paths to the installers with silent commands to add to the registry. Call a cleanup.cmd file and a regtweaks.reg file. They will all be executed when RunOnceEx is executed, by using a special command you could run RunOnceEx at the same time the cmd file was executed wich was called early setup stage T13, before firstlogon. You could even add reboots. This was soo easy! all settings and apps would be applied for all future created users. Also, I want to add a few regtweaks to the registry before users are created, the most important regtweak is the one that has the location of the C:\Users folder, with a regtweak I want to change this to D:\ (thats also one reason why this tweak should be applied before users are created).After searching I've learned about Setupcomplete.cmd but lots of people report issues about not all commands being executed. Google is full of bad stories about this method.Then there is Synchronous commands at Firstlogon. But I want my apps and regtweaks to be installed/applied for all users, also the ones created in the future. So this won't work.Anyone willing to share their thoughts? Edited April 20, 2011 by ZileXa
ricktendo Posted February 1, 2011 Posted February 1, 2011 (edited) You have to install windows 7, boot into sysprep mode, install apps, add regtweaks, generalize, capture the image, then in autounattend.xml you have to use CopyProfile so the settings overwrite the Default User's settingsHope to make a vid in the next few weeks on preinstalling apps, for the time being here is a link on how to do a reverse integration of vista that is pretty much the same dealhttp://blogs.techrepublic.com.com/window-on-windows/?p=1249 Edited February 1, 2011 by ricktendo64
ZileXa Posted February 1, 2011 Author Posted February 1, 2011 (edited) From what I've read about this method, it's exactly what I do not want...What if I do exactly what you say, install stuff like Firefox, Office, java, Flash, Photoshop and whatever.Now 2 weeks later I would like to replace Firefox in my uA_Win7 setupdvd with the newest Firefox 4 final. I would have to capture a new image right?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. Edited February 1, 2011 by ZileXa
ricktendo Posted February 2, 2011 Posted February 2, 2011 (edited) Correct, you would have to re-image...thats why I dont add much, all I add are DirectX, Silverlight, dotNET4, MsSecEs, PlayReady, Office 2k10, all vc rutimes and maybe flash, java, shockwave (the rest I install via WPI)...I also tweak Windows how I want it, start menu, recycle bin, hidden files/folders, services, the ussual stuff, I also apply my hkcu regtweaks and whatnotThere are several programs like win7toolkit and dx integrator that have addon support, I dunno if those programs you mention have been made into addons but you can probably request them Edited February 2, 2011 by ricktendo64
ZileXa Posted February 2, 2011 Author Posted February 2, 2011 I definitely do not want to depend on people making addons for me, just want to use the normal setup files for any software I want to add. Surely there must be an easy way to do this... I'm still messing around with 0ffice2010 when thats finished I'll test setupcomplete.cmd...
allen2 Posted February 2, 2011 Posted February 2, 2011 Just my 2cent as i am not a Win7 specialist: i would prep a modded wim from the Win7 install CD and add a runonce key as you did before or (if doesn't work) install a service (with instsrv and srvany ) that would do it. Both of them would start a batch ( or another kind of script as you wish ) and list in a folder all subfolders and then for each folder exec another script that would be the silent install of the application (and if it was launched with the added service, remove it) .
ricktendo Posted February 2, 2011 Posted February 2, 2011 I definitely do not want to depend on people making addons for me, just want to use the normal setup files for any software I want to add. Surely there must be an easy way to do this... I'm still messing around with 0ffice2010 when thats finished I'll test setupcomplete.cmd...win7toolkit has an addon maker, you wont do office but it can handle firefox and stuff...win7toolkit addons copies the files into the mounted image and mounts and then mounts/adds the program registry settings
maxXPsoft Posted February 4, 2011 Posted February 4, 2011 I do it this way where my APPS folder is on another drive. Then if I update any application it picks up from there like you said if name was same and since I use simple autoit where it makes that even easier$search = FileFindFirstFile ( @ScriptDir & "\Firefox Setup 3*.exe" ); Search distribution
ZileXa Posted February 6, 2011 Author Posted February 6, 2011 (edited) I do it this way where my APPS folder is on another drive. Then if I update any application it picks up from there like you said if name was same and since I use simple autoit where it makes that even easier$search = FileFindFirstFile ( @ScriptDir & "\Firefox Setup 3*.exe" ); Search distributionI just use a dedicated USB stick for my ua windows 7+apps. So all the apps will be on the stick in an APPS folder.I'm going to test runonce and setupcomplete. Unfortunately my harddisk containing all my important stuff isnt working anymore so I have to figure out a way to save that data before I continue this project.EDIT:The most important thing for me is to apply regtweaks during install that will apply for all users created in the future... Edited February 7, 2011 by ZileXa
RickSteele Posted February 8, 2011 Posted February 8, 2011 (edited) The following batch will load your wim, then the wim registry hives, apply reg tweaks, save and unload both, or, remark the mount/unmount commands, load the wim in DISM, merge your custom files, do whatever else and dismount with DISM. You wil have to change the paths to your wims and OPK tools. Also, you may choose to name your wim hives something other than WIM_Default....etc.-no spaces, but, the names of the branches in your custom files must match the names you apply to the wim hives when you mount them.The legend is:(HKEY_CLASSES_ROOT)HKEY_LOCAL_MACHINE\WIM_Software\Classes(HKEY_CURRENT_USER)HKEY_LOCAL_MACHINE\WIM_Default(HKEY_LOCAL_MACHINE\SOFTWARE)HKEY_LOCAL_MACHINE\WIM_Software(HKEY_LOCAL_MACHINE\SYSTEM)HKEY_LOCAL_MACHINE\WIM_SystemThe remarked entries are self explanatory:CLS@echo offREM "C:\Program Files\WindowsResources\Windows AIK\Tools\amd64\Servicing\Dism.exe" /mount-wim /wimfile:"D:\GRMCULXFREO_EN\sources\install.wim" /index:4 /mountdir:"D:\DISM_Folders\mount"pausereg.exe load HKEY_LOCAL_MACHINE\WIM_Default "D:\DISM_Folders\mount\Users\Default\NTUSER.DAT"reg.exe load HKEY_LOCAL_MACHINE\WIM_Software "D:\DISM_Folders\mount\Windows\System32\config\SOFTWARE"reg.exe load HKEY_LOCAL_MACHINE\WIM_System "D:\DISM_Folders\mount\Windows\System32\config\SYSTEM"pauseREM reg.exe import "D:\DISM_Folders\DISM_Temp\GRMCULXFREO_EN\ServicesTemplate.reg"REM pauseREM reg.exe import "D:\DISM_Folders\DISM_Temp\GRMCULXFREO_EN\ContextMenu.reg"REM pauseREM reg.exe import "D:\DISM_Folders\DISM_Temp\GRMCULXFREO_EN\RegistryTweaks.reg"REM pauseREM reg.exe import "D:\DISM_Folders\DISM_Temp\GRMCULXFREO_EN\GroupPolicyRegistry.reg"REM pausereg.exe unload HKEY_LOCAL_MACHINE\WIM_Defaultreg.exe unload HKEY_LOCAL_MACHINE\WIM_Softwarereg.exe unload HKEY_LOCAL_MACHINE\WIM_SystempauseREM "C:\Program Files\WindowsResources\Windows AIK\Tools\amd64\Servicing\Dism.exe" /unmount-wim /mountdir:"D:\DISM_Folders\mount" /commitREM "C:\Program Files\WindowsResources\Windows AIK\Tools\amd64\Servicing\Dism.exe" /unmount-wim /mountdir:"D:\DISM_Folders\mount" /discardREM "C:\Program Files\[size="2"]WindowsResources[/size]\Windows AIK\Tools\amd64\oscdimg.exe" -u2 -m -o -lGRMCULXFREO_EN_DVD -b"D:\DISM_Folders\DISM_Temp\etfsboot.com" -yo"D:\DISM_Folders\DISM_Temp\bootorder.txt" "D:\GRMCULXFREO_EN" "C:\GRMCULXFREO_EN_DVD.iso"REM "C:\Program Files\WindowsResources\Windows AIK\Tools\amd64\oscdimg.exe" -u2 -m -o -lGRMCULXFREO_EN_DVD -b"D:\DISM_Folders\DISM_Temp\etfsboot.com" -yo"D:\DISM_Folders\DISM_Temp\bootorder.txt" "D:\GRMCULXFREO_EN_DVD" "C:\GRMCULXFREO_EN_DVD.iso"REM pauseEXIT Edited March 4, 2011 by RickSteele
ZileXa Posted February 28, 2011 Author Posted February 28, 2011 I was actually looking for a method to apply regtweaks.reg during windows setup, using either autounattend.xml or a different method. I have tried the following commands at various stages, using autounattend pass Specialize and FirstLogonCommands and SetupComplete, but NONE applied the HKCU regtweaks for all users created.:: first attempt::==========START /wait regedit.exe /s %SETUPDRIVE%\Regtweaks.reg:: second attempt:: Load the default profile hiveSTART /wait REG LOAD HKU\DefaultUser C:\Users\Default\NTUSER.DAT:: Configure the default user profile (try two different methods)START /wait REG IMPORT %SETUPDRIVE%\Regtweaks.regSTART /wait regedit.exe /s %SETUPDRIVE%\Regtweaks.reg:: Unload the default profile hiveSTART /wait REG UNLOAD HKU\DefaultUserI wanted to do this without using OPK Tools... but it seems I have no other option. I think it's weird that we cannot just apply regfiles before the first user logs on and apply it for all users created in the future. This was perfectly possible with WinXP. It seems loading wim is the only reliable way to go, I'll try the above script. O WAIT! I have even imported my regtweaks file in RTSevenLite! wich also applies the tweak to the wim source! Still they are not being applied. So either RT7lite is buggy or this method is also not working.
ZileXa Posted February 28, 2011 Author Posted February 28, 2011 To install OPK tools, I have to enroll into something... I get to see a " Enrolling in the Microsoft Partner Network" website...Why would all of this be necessary (hell why download 2 GB opktools to install Win7 x64 wich is not even 2GB!?) just to apply regtweaks for all users.
ricktendo Posted February 28, 2011 Posted February 28, 2011 (edited) To install OPK tools, I have to enroll into something... I get to see a " Enrolling in the Microsoft Partner Network" website...Why would all of this be necessary (hell why download 2 GB opktools to install Win7 x64 wich is not even 2GB!?) just to apply regtweaks for all users.You dont need OPK to do what he is suggesting, WAIK can do itBTW OPK and WAIK are almost identical Edited February 28, 2011 by ricktendo64
maxXPsoft Posted March 1, 2011 Posted March 1, 2011 Ricksteele posted the easiest way to add HKCU to default. Mount the wim and applyThe only place HKCU reg tweaks work is during oobe and after a user is created.
ZileXa Posted March 1, 2011 Author Posted March 1, 2011 I already tried his method by running this cmd file after RT 7lite loads the image (this way I don't have to register as an OEM and download 2GB OPKTools):reg load hklm\temp1 %temp%\rt_mount\users\administrator\ntuser.datreg load hklm\temp2 %temp%\rt_mount\windows\system32\config\softwarepausereg.exe import "D:\downloads\RegTweaks.reg"pausereg.exe unload hklm\temp1reg.exe unload hklm\temp2PAUSEThis script runs flawlessly, but when I install windows and check the tweaks, they have not been applied for hkcu. I don't know why Ricksteele reported success, since I can clearly see the HKCU tweaks did not apply.What I am doing now is dirty but works partially:create a shortcut inside the Default users Start Menu (after Rt 7 lite has loaded the image: %temp%\rt_mount\users\default) inside the Startup subfolder of the startmenu.This shortcut launches a cmd file that I will place inside C:\Users.This cmd file cleans up the current users start menu and desktop and runs the regtweaks.reg file, at the end it deletes the shortcut in the startmenu of the current user (not the default user).This way, every user created in the future will have a shortcut that will call this batchfile.I said it works partially because:I use HKCU regtweaks to place Desktop, My docs, My music, My Downloads, My Pictures, My Videos in D:\%username%.And I use HKLM regtweaks to place Public Music, Public Downloads, Public Pictures and Public Videos in D:\.For #2 everything goes fine. the public folders are located on D:\ after Windows Setup.For #1, the regtweaks will be applied (via start menu Startup) after those folders have been created already on the C:\Users\%Username%. So I have to reboot again after first login to see the changes. And even after reboot I do see the D:\%username% folder, but it only contains My documents and Desktop (My Pictures, My Downloads, My Music etc is missing). So I still have to find a fix for this.
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