![]() ![]() |
Apr 7 2007, 07:56 PM Post
#1 | |
| Pharmassist Group: Moderator Posts: 1622 Joined: 31-July 04 From: United States Member No.: 25917 OS: Vista Ultimate x64 | How to Integrate Vista Updates This guide shows you how to integrate Vista updates to the installation source, which is install.wim. Much of the credit for this guide goes to FireGeier. His site contains a lot of useful visual guides for automating Vista installations. It is found here: FireGeier's Unattended Vista Guide. Although others have used peimg.exe, official documentation from Microsoft's WAIK is lacking. Therefore, methods described here use Package Manager. The only place peimg.exe is used in this guide is to create a text file that lists the packages that were integrated. Requirements
This post has been edited by spacesurfer: May 16 2007, 08:11 PM |
| | |
Apr 7 2007, 10:06 PM Post
#2 | |
| MSFN Addict ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1554 Joined: 14-November 03 From: Texas Member No.: 9484 OS: Windows 7 x64 |
Every bit of this is covered here in FireGeier links and in fact most is a copy of that http://www.msfn.org/board/index.php?showtopic=95462 |
| | |
Apr 8 2007, 08:07 AM Post
#3 | |
| Pharmassist Group: Moderator Posts: 1622 Joined: 31-July 04 From: United States Member No.: 25917 OS: Vista Ultimate x64 | Every bit of this is covered here in FireGeier links and in fact most is a copy of that http://www.msfn.org/board/index.php?showtopic=95462 I credited him for that. I got his permission as well. It's all in one place, however. Thanks. |
| | |
Apr 13 2007, 12:55 AM Post
#4 | |
| Follow the rules please :-) Group: Patrons Posts: 6780 Joined: 14-November 03 From: Bangalore, India Member No.: 9470 |
Concise to read, and quick to execute |
| | |
Apr 17 2007, 12:06 PM Post
#5 | |
| Pharmassist Group: Moderator Posts: 1622 Joined: 31-July 04 From: United States Member No.: 25917 OS: Vista Ultimate x64 |
I've modified the original post so the instructions are clear and I've included the batch files for download.
|
| | |
Apr 17 2007, 12:33 PM Post
#6 | |
| Microsoft® MVP ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1249 Joined: 31-March 06 From: India Member No.: 92414 OS: Vista Ultimate x86 |
Most of things are copied But much easier with cmd scripts ...Nice |
| | |
May 21 2007, 08:21 PM Post
#7 | |
| Member ![]() ![]() Group: Members Posts: 103 Joined: 8-April 04 From: Centennial, Colorado Member No.: 17484 OS: none |
expand.cmd CODE Dir /OD > Sort.txt For /F "Tokens=5" %%i IN ('FINDSTR ".cab" Sort.txt') DO Call :WriteXML %%i Wouldn't this work? CODE For /F %%i IN ('Dir /B /OD *.cab') DO Call :WriteXML %%i Then there'd be no need for Sort.txt |
| | |
May 22 2007, 02:24 AM Post
#8 | |
| Advanced Member ![]() ![]() ![]() Group: Members Posts: 405 Joined: 24-October 05 Member No.: 77605 |
Hello arablizzard2413! Yes, you're right that should be an easier solution and it should work. I'm not the "king" of batch programers, so it could be that there is further code which could be more simplified. Thanks for your input! Will try out and change, if it's working fine finaly. Regards, Martin |
| | |
May 22 2007, 08:38 PM Post
#9 | |
| Member ![]() ![]() Group: Members Posts: 103 Joined: 8-April 04 From: Centennial, Colorado Member No.: 17484 OS: none |
If you don't mind I've created my own version that's cleaned up and a little more automated. I've only tested it on Windows XP. The process is the same as above with the following exceptions: 1) Folder paths with spaces don't cause errors (can be used from folder on Desktop) 2) Paranoid file finding measures to prevent any missing file errors later on 3) Automatically integrates each image, if an error occurs the process stops asking if you want to continue 4) No need to change the tokens value (it was removed) 5) for x86 only, but can be easily modified for x64 set_dirs.cmd CODE @IF "%1"=="" GOTO INFO :: Set the variables used in run.cmd, names with spaces supported :: Set working dirs SET vpath=%CD% SET vmount=%vpath%\Mount SET vsbox=%vpath%\Sandbox SET vupdates=%vpath%\Updates SET vtemp=%vupdates%\Temp :: Set paths to tools :: Distrust %PATH%; errors with %PATH%s which are too long SET expand=%ProgramFiles%\Windows AIK\Tools\Servicing\Expand.exe SET pkgmgr=%ProgramFiles%\Windows AIK\Tools\Servicing\pkgmgr.exe SET imagex=%ProgramFiles%\Windows AIK\Tools\x86\imagex.exe SET peimg=%ProgramFiles%\Windows AIK\Tools\PETools\peimg.exe GOTO EOF :INFO @ECHO Edit the file paths using notepad @ECHO Then start Hotfix.cmd. @PAUSE :EOF Hotfix.cmd CODE @ECHO OFF TITLE Vista Hotfix Integration ECHO. :: Hotfix.cmd & set_dirs.cmd must be together, you'll get an "Files missing." otherwise. :: Dirs with spaces are supported ;-) set them in set_dirs.cmd CD /d %~dp0 SET KILL= ECHO Windows Vista x86 Hotfix Integration tool ^| 5-22-2007 ECHO ---- by AraBlizzard2413 ECHO Original versions by FireGeier and spacesurfer ECHO. :: Begin paranoid file check IF EXIST set_dirs.cmd (CALL set_dirs.cmd 1) ELSE (GOTO ERR) FOR %%E IN ("%pkgmgr%" "%imagex%" "%peimg%") DO IF NOT EXIST %%E SET KILL=1 IF NOT EXIST "%expand%" SET expand=%WINDIR%\System32\Expand.exe IF NOT EXIST "%vupdates%\*" MKDIR "%vupdates%" IF NOT EXIST "%vpath%\install.wim" SET KILL=1 IF "%KILL%"=="1" GOTO ERR ECHO Your working path is: ECHO %vpath% ECHO. ECHO If this is correct, press any key to continue. PAUSE>NUL :: Cleaning & safeguard IF NOT EXIST "%vtemp%\*" MKDIR "%vtemp%" DEL "%vtemp%\*.*" /q :: Check for bad mount or files IF EXIST "%vmount%\Windows\*" "%imagex%" /unmount "%vmount%" IF EXIST "%vmount%\*.*" RD "%vmount%" /s /q IF NOT EXIST "%vmount%\*" MKDIR "%vmount%" IF NOT EXIST "%vsbox%\*" MKDIR "%vsbox%" IF NOT EXIST "%vupdates%\*.msu" GOTO ERR :: Start the process! :: Extraction PUSHD "%vupdates%" FOR %%M IN (*.msu) DO CALL :EXTRACT %%M :: Don't bother deleteing, overwrite Integrate.xml ECHO. ECHO Creating Integrate.xml... ( ECHO ^<?xml version="1.0" encoding="utf-8"?^> ECHO ^<unattend xmlns="urn:schemas-microsoft-com:unattend"^> ECHO ^<servicing^> ) >"%vtemp%\Integrate.xml" :: Sort cab files by date and add lines to Integrate.xml PUSHD "%vtemp%" FOR /F %%I IN ('DIR /B /OD *.cab') DO CALL :ENTRYXML %%I :: Finish Integrate.xml ( ECHO ^</servicing^> ECHO ^</unattend^> ECHO. ) >>"%vtemp%\Integrate.xml" ECHO File Created. ECHO. ECHO Check Integrate.xml for errors. PAUSE :: There are 7 versions of Vista in install.wim, 8 is not used SET counter=1 SET max=8 ECHO Now Integrating... :INT SET type= IF %counter%==%max% GOTO EXIT IF %counter%==1 SET type=BUSINESS IF %counter%==2 SET type=HOMEBASIC IF %counter%==3 SET type=HOMEPREMIUM IF %counter%==4 SET type=ULTIMATE IF %counter%==5 SET type=HOMEBASICN IF %counter%==6 SET type=BUSINESSN IF %counter%==7 SET type=STARTER "%imagex%" /mountrw "%vpath%\install.wim" %counter% "%vmount%" ECHO Starting integration for %type%, do not close this window!... START "Starting Package Manager" /WAIT "%pkgmgr%" /o:"%vmount%;%vmount%\Windows" /n:"%vtemp%\Integrate.xml" /s:"%vsbox%" /l:"%vpath%\integrate_%counter%_%type%" :: If ErrorLevel = 0 build & repeat for next image, if not ask. IF %ERRORLEVEL%==0 ECHO No errors found IF NOT %ERRORLEVEL%==0 GOTO RESUME :BUILD "%peimg%" /list /image="%vmount%\Windows" >> "%vpath%\updates_installed_%counter%_%type%.txt" RD "%vsbox%" /s /q MKDIR "%vsbox%" "%imagex%" /unmount /commit "%vmount%" SET /A counter=%counter%+1 GOTO INT :: Subprocesses :EXTRACT ECHO. ECHO %1 extraction in progress... START "Expand" /WAIT "%expand%" %1 -f:*-x86.* "%vtemp%" ECHO File finished. GOTO EOF :ENTRYXML IF "%1"=="" GOTO EOF SET KB_=%1 SET KB_=%KB_:~0,-4% ECHO ^<package action="install"^> >>"%vtemp%\Integrate.xml" FOR /F "Tokens=*" %%L IN ('FINDSTR "assemblyIdentity" "%vtemp%\%KB_%.xml"') DO (ECHO %%L >>"%vtemp%\Integrate.xml") ( ECHO ^<source location="%vtemp%\%KB_%.cab" /^> ECHO ^</package^> ) >>"%vtemp%\Integrate.xml" GOTO EOF :RESUME ECHO Error Level: %ERRORLEVEL% SET choice= SET /p choice=If you still want to continue, choose Y. To abort choose N: IF NOT '%choice%'=='' SET choice=%choice:~0,1% IF '%choice%'=='Y' goto BUILD IF '%choice%'=='y' goto BUILD IF '%choice%'=='N' goto UNMOUNT IF '%choice%'=='n' goto UNMOUNT ECHO. ECHO "%choice%" invalid! ECHO. GOTO RESUME :ERR ECHO. ECHO Files missing. @ECHO ON @GOTO EOF :UNMOUNT "%imagex%" /unmount "%vmount%" :EXIT ECHO. ECHO Process Finished. PAUSE @ECHO ON :EOF Attached File(s) |
| | |
May 23 2007, 11:01 AM Post
#10 | |
| Advanced Member ![]() ![]() ![]() Group: Members Posts: 405 Joined: 24-October 05 Member No.: 77605 |
Hello arablizzard2413! Well, what you're doing with your set_dirs.cmd is done by perpelab.cmd of my Vista Batch Modules. Have a look at the build_menu.cmd, which is creating the menu by install.wim index. Thats more flexible instead fo checking for "Business", "Ultimate" etc.. Regards, Martin |
| | |
May 23 2007, 12:54 PM Post
#11 | |
| Newbie Group: Members Posts: 14 Joined: 1-April 07 Member No.: 133686 |
Hello, To integrate Hotfixes very easy, I use "Vista Update Integrator" and go to this site to take them : http://www1.webng.com/xpsp3/ |
| | |
May 23 2007, 02:19 PM Post
#12 | |
| Pharmassist Group: Moderator Posts: 1622 Joined: 31-July 04 From: United States Member No.: 25917 OS: Vista Ultimate x64 | CODE For /F %%i IN ('Dir /B /OD *.cab') DO Call :WriteXML %%i Great tip. Thanks, I'll have to modify mine. This post has been edited by spacesurfer: May 23 2007, 02:33 PM |
| | |
May 23 2007, 11:56 PM Post
#13 | |
| Member ![]() ![]() Group: Members Posts: 103 Joined: 8-April 04 From: Centennial, Colorado Member No.: 17484 OS: none | Have a look at the build_menu.cmd, which is creating the menu by install.wim index. Thats more flexible instead fo checking for "Business", "Ultimate" etc.. The "Business", "Ultimate" etc checks are only used for naming the log files, so it's not something vital. I just wanted to make it easier to understand which version the log file belonged to. All the image.wim files I've seen use the same numbers for the images, so I didn't think it would be a problem. This post has been edited by arablizzard2413: May 24 2007, 12:12 AM |
| | |
May 24 2007, 06:24 AM Post
#14 | |
| Junior ![]() Group: Members Posts: 78 Joined: 3-June 05 Member No.: 58816 |
does this method really slipstream hotfixes? i've been using peimg to add hotfixes but my install grows when i add the hotfixes. i believe the method i'm using is similar to SVCPACK.INF Method for XP. is there a way of real slipstreaming?
|
| | |
May 24 2007, 10:08 AM Post
#15 | |
| Advanced Member ![]() ![]() ![]() Group: Members Posts: 405 Joined: 24-October 05 Member No.: 77605 |
AFAIK it does slipstream the updates / hotfixes. It's normal behaviour of install.wim that it's growing, once you change something. If you want to reduce the size of install.wim after doing changes, you need to export install.wim to a new .wim file. Regards, Martin |
| | |
May 24 2007, 10:58 AM Post
#16 | |
| Junior ![]() Group: Members Posts: 78 Joined: 3-June 05 Member No.: 58816 |
i do export my .wim file. it seems to grow by i don't know like 40% of hotfix size. exp 100mb hotfixes = 40mb wim increase. thats just an example not my real numbers. also i use peimg instead of pkgmr with a two step process. CODE peimg /import=c:\updates\*.cab c:\mount\windows and the CODE peimg /install=*Package* c:\mount\windows This post has been edited by geo411m: May 24 2007, 11:05 AM |
| | |
Jun 22 2007, 05:42 AM Post
#17 | |
| Junior ![]() Group: Members Posts: 68 Joined: 14-November 05 From: Iran Member No.: 79646 |
Hi Me Need Code For Extract install.wim from Vista installation DVD to %vpath%. Thank you |
| | |
Jun 22 2007, 06:12 AM Post
#18 | |
| Advanced Member ![]() ![]() ![]() Group: Members Posts: 405 Joined: 24-October 05 Member No.: 77605 |
Hello AHRIMANSEFID! You just need to copy the install.wim from your Vista DVD \sources directory to a directory on your HD. Than you put the location of this directory to the line: CODE SET vpath=%CD% for example: CODE SET vpath=D:\VistaDVD That requires that you've copied the Vista DVD to the VistaDVD folder on your D: drive (D:\VistaDVD). All the rest is done by the batch. Regards, Martin |
| | |
Jun 22 2007, 06:17 AM Post
#19 | |
| Junior ![]() Group: Members Posts: 68 Joined: 14-November 05 From: Iran Member No.: 79646 |
Thank You But Me Need Extract install.wim All File Need For Edit.
|
| | |
Jun 22 2007, 06:39 AM Post
#20 | |
| Advanced Member ![]() ![]() ![]() Group: Members Posts: 405 Joined: 24-October 05 Member No.: 77605 | |
| | |
![]() ![]() |
| Lo-Fi Version | Time is now: 7th November 2009 - 08:50 PM |