Hi Bilou
there is not much scripting required - here is a summary of what I did:
1. install dotnet2 and capture the changes with regshot or installrite. (its easiest to do this on the same system so that no translation of reg-entries is necessary)
This will result in a maybe 1.6 MB reg-patch and about 235 MB of added files in this directories:
assembly
inf
Microsoft.net
system32
WINSXS
Next I copied these 5 directories into "add2win.wim" - with highest compression this makes a 72 MB package - and copied this wim-image into a vmdk
2. on next boot of BartPE I mount the vmdk and then mount the "add2win.win" to R:\add2win - looks like readonly is suffiecient for my needs.
3. next I copy/junction from R:\add2win to X:\i386 with this batch
CODE
RoboCopy.exe "R:\add2win\system32" "X:\I386\SYSTEM32" *.* /R:0 /W:0 /E /ZB /COPY:DAT /XO /IT /TEE /FP /NDL /NP /LOG+:"R:\HOME\MOON\DESKTOP\ROBOCOPY.LOG"
RoboCopy.exe "R:\add2win\WINSXS" "X:\I386\WINSXS" *.* /R:0 /W:0 /E /ZB /COPY:D /XO /NS /NC /NDL /NP /NJH /NJS
if not exist X:\i386\assembly junction X:\i386\assembly R:\add2win\assembly
if not exist X:\i386\Microsoft.net junction X:\i386\Microsoft.net R:\add2win\Microsoft.net
if not exist X:\i386\RegisteredPackages junction X:\i386\RegisteredPackages R:\add2win\RegisteredPackages
if not exist X:\i386\INF\000 junction X:\i386\INF\000 R:\add2win\INF\000
if not exist X:\i386\INF\001 junction X:\i386\INF\001 R:\add2win\INF\001
if not exist X:\i386\INF\005 junction X:\i386\INF\005 R:\add2win\INF\005
if not exist X:\i386\INF\006 junction X:\i386\INF\006 R:\add2win\INF\006
if not exist X:\i386\INF\007 junction X:\i386\INF\007 R:\add2win\INF\007
if not exist X:\i386\INF\008 junction X:\i386\INF\008 R:\add2win\INF\008
if not exist X:\i386\INF\009 junction X:\i386\INF\009 R:\add2win\INF\009
if not exist X:\i386\INF\00A junction X:\i386\INF\00A R:\add2win\INF\00A
if not exist X:\i386\INF\00B junction X:\i386\INF\00B R:\add2win\INF\00B
if not exist X:\i386\INF\00C junction X:\i386\INF\00C R:\add2win\INF\00C
if not exist X:\i386\INF\00D junction X:\i386\INF\00D R:\add2win\INF\00D
if not exist X:\i386\INF\00E junction X:\i386\INF\00E R:\add2win\INF\00E
if not exist X:\i386\INF\010 junction X:\i386\INF\010 R:\add2win\INF\010
if not exist X:\i386\INF\011 junction X:\i386\INF\011 R:\add2win\INF\011
if not exist X:\i386\INF\012 junction X:\i386\INF\012 R:\add2win\INF\012
if not exist X:\i386\INF\013 junction X:\i386\INF\013 R:\add2win\INF\013
if not exist X:\i386\INF\014 junction X:\i386\INF\014 R:\add2win\INF\014
if not exist X:\i386\INF\015 junction X:\i386\INF\015 R:\add2win\INF\015
if not exist X:\i386\INF\019 junction X:\i386\INF\019 R:\add2win\INF\019
if not exist X:\i386\INF\01D junction X:\i386\INF\01D R:\add2win\INF\01D
if not exist X:\i386\INF\01F junction X:\i386\INF\01F R:\add2win\INF\01F
if not exist X:\i386\INF\404 junction X:\i386\INF\404 R:\add2win\INF\404
if not exist X:\i386\INF\416 junction X:\i386\INF\416 R:\add2win\INF\416
if not exist X:\i386\INF\804 junction X:\i386\INF\804 R:\add2win\INF\804
if not exist X:\i386\INF\816 junction X:\i386\INF\816 R:\add2win\INF\816
if not exist X:\i386\INF\inc junction X:\i386\INF\inc R:\add2win\INF\inc
X:\I386\SYSTEM32\shell\RoboCopy.exe "R:\add2win\inf" "X:\I386\inf" *.* /R:0 /W:0 /ZB /COPY:DAT /XO /IT /TEE /FP /NDL /NP /LOG+:"R:\HOME\MOON\DESKTOP\ROBOCOPY.LOG"
exit
With the dirs "assembly" and "Microsoft.net" I can do a junction - with the dirs "inf", "system32" and "WINSXS" I use robocopy to only copy newer files.
Actually I only have to copy a few MBs to the running system - if your EWF-filter allows 16 MB of free space you should be able to do the same.
4. finally I have to apply
regedit /s r:\setupoff.reg
regedit /s r:\framework2.reg
this patches.
No starting of services or other actions are required.
The whole procedure takes about 10 seconds.
Bilou - I doubt that 2k3-sp2 uses the same files and registry as you would need for XP - anyway I uploaded my filelist to
http://sanbarrow.com/moa23/files/filelist-add2win.txtthe batch I use is here
http://sanbarrow.com/moa23/files/add2win-cmd.cmdand the framework2.reg is here
http://sanbarrow.com/moa23/files/framework2.regWarning - this patch needs a clean-up - it still includes some "background-noise"
the setupoff.reg is a simple
CODE
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\Setup]
"SystemSetupInProgress"=dword:00000000
Hope this helps ...
Hey - one nasty trap that just comes to my mind again:
watch out when copying the "assembly" dir - in 2k3-sp2 there is a junction from
X:\I386\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a
to
X:\I386\WINSXS\x86_System.EnterpriseServices_b03f5f7f11d50a3a_2.0.0.0_x-ww_7d5f3790
- either create the same junction or simply copy the two files
System.EnterpriseServices.dll
System.EnterpriseServices.Wrapper.dll
to "assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a" manually.
Don't know if this applies to XP-sp2 ?
Ulli