Hi again,
ok, I have this working now.
First I am setting the variables (which I am not posting here), then I am doing this:
REM CREATE INDEX FILE OF Install.wim
"%WaikTools%\imagex.exe" /info %WinImagex64% > "%AIWTempx64%\indexinstallwim.txt"
REM FIND OUT IMAGECOUNT OF INSTALL.WIM
for /f "tokens=3" %%a in ('find /I "Image Count" "%AIWTempx64%\indexinstallwim.txt"') do set ImageCountMax=%%a
REM START WITH INDEX1 for IMAGECOUNT
set Index=1
REM SET STARTPOINT FOR INDEX LOOP
:startindex64
REM MOUNT WINDOWS IMAGE (install.wim) WITH CERTAIN INDEXOUNT
"%WaikTools%\imagex" /mountrw %WinImagex64% %Index% %Mount%
REM INTEGRATE DRIVERPACKS
%pkgmgr% /o:%Mount%;%Mount%\Windows /n:%driversxmlx64%
REM UNMOUNT WINDOWS IMAGE (install.wim)
"%WaikTools%\imagex" /unmount /commit %Mount%
REM IF INDEX IS LESS THAN MAX.IMAGECOUNT THEN ADD 1 TO INDEX AND GO BACK TO LOOP START
if %Index% LSS %ImageCountMax% set /A Index=%Index%+1 & goto :startindex64
I am doing the same thing later on for the 32bit install.wim (the above was for the 64bit install.wim). That way, I am integrating all driverpacks into all images of an install.wim (takes a VERY long time).
However, two things remain:
1. Can you guys tell me how you get pkgmgr to show the driver integration process for each driver? If I use the Vista Tool, cmd windows pop up showing this process. In my case, this does not happen, I see that the image was mounted, then I don´t see anything for a very long time (while the drivers are integrated) and later on the image is unmounted.
2. The fact that the drivers.xml is static is not very cool. I would like the script to adapt to different driverpaths automatically (for instance if I am copying the whole Installation folder to another drive or PC, the script should still work). So I guess I´d have to adapt the driverpath in the xml programmatically. Not very nice but seems to be the only way. Has someone here done that before ?
Bye,
Alex