Mercury_22 Posted April 8, 2007 Share Posted April 8, 2007 (edited) Batch file / Guide for Integrating Updates, Drivers & Applications ( Unattended Vista )Step 1: Install WAIK Step 2: Create this Folders in the SAME LOCATION ( e.g. D:\ ) : Updates ; Drivers .1) Updates. Place here:- Updates (Hotfixes): .MSU; .EXE; .CAB files. DON'T USE "EXPRESS.CAB" FILES ONLY FULL VERSION CAB FILES !- Applications to install with Setupcomplete.cmd: .MSI & .EXE files- Autounattend.xml, e.g. Autounattend.xml with minimum info necessary for unattended install and:1 - Manual Disk Partitioning<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UILanguage>EN-US</UILanguage> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserData> <AcceptEula>true</AcceptEula> <ProductKey> <Key></Key> <WillShowUI>OnError</WillShowUI> </ProductKey> </UserData> <ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/IMAGE/INDEX</Key> <Value>4</Value> </MetaData> </InstallFrom> <WillShowUI>OnError</WillShowUI> </OSImage> </ImageInstall> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ComputerName>WORKSTATION</ComputerName> </component> <component name="Microsoft-Windows-Security-Licensing-SLC-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SkipAutoActivation>true</SkipAutoActivation> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AutoLogon> <Enabled>true</Enabled> <LogonCount>1</LogonCount> <Username>ADMINISTRATOR</Username> </AutoLogon> <OOBE> <ProtectYourPC>3</ProtectYourPC> <SkipMachineOOBE>true</SkipMachineOOBE> <NetworkLocation>Other</NetworkLocation> </OOBE> <TimeZone>Eastern Standard Time</TimeZone> </component> </settings></unattend>2 - Automatically formating partition 1 on drive 0 and create one standard user called "User"<?xml version="1.0" encoding="utf-8"?><unattend xmlns="urn:schemas-microsoft-com:unattend"> <settings pass="windowsPE"> <component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UILanguage>EN-US</UILanguage> </component> <component name="Microsoft-Windows-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <UserData> <AcceptEula>true</AcceptEula> <ProductKey> <Key></Key> <WillShowUI>OnError</WillShowUI> </ProductKey> </UserData> <ImageInstall> <OSImage> <InstallFrom> <MetaData wcm:action="add"> <Key>/IMAGE/INDEX</Key> <Value>4</Value> </MetaData> </InstallFrom> <WillShowUI>OnError</WillShowUI> <InstallTo> <DiskID>0</DiskID> <PartitionID>1</PartitionID> </InstallTo> </OSImage> </ImageInstall> <DiskConfiguration> <Disk wcm:action="add"> <ModifyPartitions> <ModifyPartition wcm:action="modify"> <Active>true</Active> <Format>NTFS</Format> <Order>1</Order> <PartitionID>1</PartitionID> </ModifyPartition> </ModifyPartitions> <DiskID>0</DiskID> </Disk> </DiskConfiguration> </component> </settings> <settings pass="specialize"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <ComputerName>WORKSTATION</ComputerName> </component> <component name="Microsoft-Windows-Security-Licensing-SLC-UX" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <SkipAutoActivation>true</SkipAutoActivation> </component> </settings> <settings pass="oobeSystem"> <component name="Microsoft-Windows-Shell-Setup" processorArchitecture="x86" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <AutoLogon> <Enabled>true</Enabled> <LogonCount>1</LogonCount> <Username>ADMINISTRATOR</Username> </AutoLogon> <TimeZone>Eastern Standard Time</TimeZone> <OOBE> <ProtectYourPC>3</ProtectYourPC> <NetworkLocation>Other</NetworkLocation> </OOBE> <UserAccounts> <LocalAccounts> <LocalAccount wcm:action="add"> <DisplayName></DisplayName> <Name>User</Name> </LocalAccount> </LocalAccounts> </UserAccounts> </component> </settings></unattend>Please add you KEY between "<Key></Key>"- Setupcomplete.cmd for installing Applications. ( see Windows Automated Installation Kit User's Guide for more about Setupcomplete.cmd ) e.g. :@echo offCOLOR 9ETitle VISTA UPDATER ( Press : Y for YES , N for NO , P for PAUSE , C for CANCEL ):Prepare Environmentecho.Choice /C YNPC /T 5 /D Y /M "Prepare Environment"if errorlevel 4 goto Exitif errorlevel 3 goto PauseEnvironmentif errorlevel 2 goto SkipEnvironmentif errorlevel 1 goto ContinueEnvironment:SkipEnvironmentecho.goto PrepareUpdates:PauseEnvironmentecho.PAUSE:ContinueEnvironmentecho.Please Wait...echo.cd /d %0\..MD C:\MountFOR %%a 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 %%a:\efi SET DVD=%%a:XCOPY %DVD%\ C:\LRMCFRE_EN_DVD /E /G /H /I /YXCOPY .\Updates\Autounattend.xml C:\LRMCFRE_EN_DVD /I /YXCOPY .\Updates\*.exe C:\LRMCFRE_EN_DVD\SDK /I /YXCOPY .\Updates\*.msi C:\LRMCFRE_EN_DVD\SDK /I /Y:PrepareUpdatesecho.Choice /C YNPC /T 5 /D Y /M "Prepare Updates"if errorlevel 4 goto Cleanif errorlevel 3 goto PausePrepareUpdatesif errorlevel 2 goto SkipPrepareUpdatesif errorlevel 1 goto ContinuePrepareUpdates:SkipPrepareUpdatesecho.goto InstallUpdates:PausePrepareUpdatesecho.PAUSE:ContinuePrepareUpdatesecho.XCOPY .\Updates\*.cab C:\Updates /I /Yecho.Expand -f:* .\Updates\amd64\*.msu C:\Updates\echo.DEL C:\Updates\WSUSSCAN.cab:InstallUpdatesecho.Choice /C YNPC /T 5 /D Y /M "Install Updates"if errorlevel 4 goto Cleanif errorlevel 3 goto PauseInstallUpdatesif errorlevel 2 goto SkipInstallUpdatesif errorlevel 1 goto ContinueInstallUpdates:SkipInstallUpdatesecho."%PROGRAMFILES%\Windows AIK\Tools\x86\imagex.exe" /mountrw C:\LRMCFRE_EN_DVD\sources\install.wim 4 C:\Mountecho.goto Drivers:PauseInstallUpdatesecho.PAUSE:ContinueInstallUpdatesecho."%PROGRAMFILES%\Windows AIK\Tools\x86\imagex.exe" /mountrw C:\LRMCFRE_EN_DVD\sources\install.wim 4 C:\Mountecho.MD C:\Mount\Windows\Setup\ScriptsXCOPY .\Updates\Setupcomplete.cmd C:\Mount\Windows\Setup\Scripts /I /Yecho.MD C:\Mount\Windows\Prefetchecho."%PROGRAMFILES%\Windows AIK\Tools\PETools\peimg.exe" /import=C:\Updates\*.cab C:\Mount\windows echo."%PROGRAMFILES%\Windows AIK\Tools\PETools\peimg.exe" /install=*Package* C:\Mount\windowsecho."%PROGRAMFILES%\Windows AIK\Tools\PETools\peimg.exe" /install=*Pack* C:\Mount\windowsecho.echo.List of packages in the current image. In the INS column, a plus sign (+) denotes installed packages and a minus sign (-) denotes not installed.echo."%PROGRAMFILES%\Windows AIK\Tools\PETools\peimg.exe" /list C:\Mount\windows:Driversecho.Choice /C YNPC /T 5 /D Y /M "Install Drivers"if errorlevel 4 goto Unmountif errorlevel 3 goto PauseDriversif errorlevel 2 goto SkipDriversif errorlevel 1 goto ContinueDrivers:SkipDriversecho.goto BootDrivers:PauseDriversecho.PAUSE:ContinueDriversecho."%PROGRAMFILES%\Windows AIK\Tools\PETools\peimg.exe" /inf=.\Drivers\*.inf C:\Mount\windows:BootDriversecho.Choice /C YNPC /T 5 /D Y /M "Install Boot Drivers"if errorlevel 4 goto Unmountif errorlevel 3 goto PauseBootif errorlevel 2 goto SkipBootif errorlevel 1 goto ContinueBoot:SkipBootecho.goto DVD :PauseBootecho.PAUSE:ContinueBootecho."%PROGRAMFILES%\Windows AIK\Tools\x86\imagex.exe" /unmount /commit C:\Mountecho."%PROGRAMFILES%\Windows AIK\Tools\x86\imagex.exe" /mountrw C:\LRMCFRE_EN_DVD\sources\boot.wim 2 C:\Mountecho."%PROGRAMFILES%\Windows AIK\Tools\PETools\peimg.exe" /inf=.\Drivers\iaahci.inf C:\Mount\windowsecho."%PROGRAMFILES%\Windows AIK\Tools\PETools\peimg.exe" /inf=.\Drivers\iastor.inf C:\Mount\windows:DVDecho.Choice /C YNPC /T 5 /D Y /M "Create Vista DVD Image File"if errorlevel 4 goto Unmountif errorlevel 3 goto PauseDVDif errorlevel 2 goto SkipDVDif errorlevel 1 goto ContinueDVD:SkipDVDecho."%PROGRAMFILES%\Windows AIK\Tools\x86\imagex.exe" /unmount /commit C:\Mountgoto Clean:PauseDVDecho.PAUSE:ContinueDVDecho."%PROGRAMFILES%\Windows AIK\Tools\x86\imagex.exe" /unmount /commit C:\Mountecho."%PROGRAMFILES%\Windows AIK\Tools\PETools\oscdimg.exe" /b"%PROGRAMFILES%\Windows AIK\Tools\PETools\x86\boot\etfsboot.com" /h /lLRMCFRE_EN_DVD /o /u2 C:\LRMCFRE_EN_DVD C:\Image.iso:Cleanecho.Choice /C YNP /T 5 /D Y /M "Cleaning up"if errorlevel 3 goto PauseCleanif errorlevel 2 goto Exitif errorlevel 1 goto Cleaning:PauseCleanecho.PAUSE:Cleaningecho.RD /S /Q C:\Updatesecho.RD /S /Q C:\Mountecho.RD /S /Q C:\LRMCFRE_EN_DVD:Exitecho.EXIT:Unmountecho."%PROGRAMFILES%\Windows AIK\Tools\x86\imagex.exe" /unmount C:\Mountecho.goto Cleanecho.EXITNOTE:- The "Boot Drivers" are for Intel RAID/AHCI, just replace iaahci.inf and iastor.inf with your .inf files- "install.wim 4 " it's for Vista Ultimate change the number according to your Vista version- For Vista x64 replace x86 with amd64 - Please exit all other programs and use the built-in ADMINISTRATOR ACCOUNT !even if (you run these batch in elevated mode) your account it's an administrator account and you have disable UAC, or you use "run as administrator". - Tested with Vista x86 & Vista x64 If you're using XP try add start /wait at the beginning of every command and delete all "choice" lines or get choice.exe from xp x64, or vista, or...Please let me know if you encounter any problems Edited January 23, 2008 by Mercury_22 Link to comment Share on other sites More sharing options...
jdrom17 Posted April 9, 2007 Share Posted April 9, 2007 To make things a bit easier as new updates come out, you can use the following code:"%PROGRAMFILES%\Windows AIK\Tools\PETools\peimg.exe" c:\mount\windows /import=D:\Documents\SDK\Updates\*.cabIt's how I do it. Use a *.cab then it just adds all files with .cab in the folder. So as new updates come, it's simple to add them without editing the batch file. Link to comment Share on other sites More sharing options...
Mercury_22 Posted April 9, 2007 Author Share Posted April 9, 2007 (edited) To make things a bit easier as new updates come out, you can use the following code:"%PROGRAMFILES%Windows AIKToolsPEToolspeimg.exe" c:mountwindows /import=D:DocumentsSDKUpdates*.cabIt's how I do it. Use a *.cab then it just adds all files with .cab in the folder. So as new updates come, it's simple to add them without editing the batch file.You're right! Thanks!I've made the modification in the first post! Edited November 7, 2007 by Mercury_22 Link to comment Share on other sites More sharing options...
spacesurfer Posted April 16, 2007 Share Posted April 16, 2007 Personally, I'd rather use Package Manager myself since technically peimg is for WinPE. Microsoft's WAIK does not mention using peimg as the way to integrate updates offline. It instead uses pkgmgr.Since you are using peimg to install updates one-by-one, meaning using the for command to integrate each update one-by-one, you are not checking for dependencies.However, package manager uses an xml file to integrate updates, which checks for dependencies.See FireGeier's guide, which is a comprehensive guide from begininng to end, or this one just for updates only. Link to comment Share on other sites More sharing options...
Mercury_22 Posted April 16, 2007 Author Share Posted April 16, 2007 (edited) =========Edit========Useless see first post Edited November 7, 2007 by Mercury_22 Link to comment Share on other sites More sharing options...
FireGeier Posted April 16, 2007 Share Posted April 16, 2007 Using wildcards makes peimg to install all in order (if you don't use wildcards just install them in ascending order) and since all the Hotfixes are the full version (not express version) you don't need to check for dependencies (Keep in mind that the Packs are getting installed AFTER Packages)As for Microsoft's WAIK better check again Maybe you need this WAIK_doc_update_1.zip it's the update for WAIK User's Guide (Date Published:4/2/2007)I WILL ALWAYS PREFER SIMPLE STRAIGHTFORWARD WORKING SOLUTIONS ,but if you prefer complicated ... to a simple working solution be my guest!!! Hello Mercury_22!First of all: I don't want to dispute!I've just one question:Is there any side effect using peimg for a full Vista Version, cause actual WAIK help says:PEimg.exe is command-line tool for creating and modifying Windows PE 2.0 images offline.So from "official" side it's not designed to integrate something in the full Vista image. Don't missunderstand: I know that this does not mean automatically, that it does not work for a full image as well. It may work and it seems to work fine, but I can't tell for sure, cause I don't have the knowledge. So if you know exactly than please let me know.WAIK help (actual) does say about pkgmgr:Package Manager (Pkgmgr.exe) is a command-line tool that you can use offline to install, remove, or update Windows packages. You can add packages, provided as .cab files, to an offline Windows image. Package Manager can also enable or disable Windows features, either offline or on a running Windows installation....Benefits of Package ManagerPackage Manager can do the following:Install or uninstall hotfixes provided by Microsoft....Accept an answer file as input (offlineServicing settings only)....Add packages to an offline Windows image.Install or uninstall multiple packages with one command string....Some packages require other packages to be installed first. Because of this dependency requirement, if you are installing multiple packages, do one of the following:Use an answer file. By passing an answer file to Package Manager, multiple packages can be installed in the correct order. This is the preferred method for installing multiple packages.Install or remove multiple packages in a single command as a semicolon-separated list. The packages can appear in any order. Package Manager installs or removes the packages in the correct order.So if I use package manager I know for sure, that it will install the updates correctly to a full Vista image and check dependencies. This is the ONLY reason why I prefere this mehtod. It's not better or worser than yours and it's not more complicated or less complicated than yours. It's just the official way of doing it.So far no one could answer or has answered my question and so I stay with the "official" way of doing it.Expect from that I respect your and all the others work for sharing this mehtod and the knowledge about! But an exact answer of my question would be highly aprecciated! Thanks 'n' regards,Martin Link to comment Share on other sites More sharing options...
spacesurfer Posted April 16, 2007 Share Posted April 16, 2007 You seem pretty adamant about your method. I won't argue. Just trying to caution users on this forum that they need to look at both methods and decide which they should follow.Again, just like FireGeier said, can you back up your claim from WAIK? He backed up his claim by posting snippets from WAIK. I'm curious to see where you saw you can use PEIMG for VISTA INSTALL.WIM, not just for the WINPE image. (The name PEIMG is a clue that it's for WINPE.) Lot's of people are using this methods it seems but doesn't mean it's the right method.Again, let's calm down. We're not saying PEIMG doesn't work. We are just not sure if it really worked like it seems to have worked because it's not backed by MS official documentation that I've seen thus far.** Also, simple does not always mean correct. ** Link to comment Share on other sites More sharing options...
Mercury_22 Posted April 16, 2007 Author Share Posted April 16, 2007 (edited) =========Edit========Useless see first post Edited November 7, 2007 by Mercury_22 Link to comment Share on other sites More sharing options...
Yzöwl Posted May 16, 2007 Share Posted May 16, 2007 @Mercury_22I have merged six of your posts into just two. Please use the edit button if you wish to add content to the thread prior to another member creating a follow-up.Thank you. 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