What is wrong with this command: G:\!Work\GDism\x86\DISM\DISM.exe /Capture-Image /ImageFile:G:\Temp\install.wim /CaptureDir:I:\ /Name:”Win811Pro” /compress:max It is not writing win name?!
For each index? You could make a for /l loop something like this: Code: for /l %%x in (1, 1, 10) do ( dism /mount-wim /mountdir:c:\win81\sources\install.wim /index:%%x /mountdir:c:\mount dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2919442-x86.msu dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2939087-x86.msu dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2919355-x86.msu dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2932046-x86.msu dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2937592-x86.msu dism /image:c:\mount /add-package /packagepath:c:\MSU\Windows8.1-KB2938439-x86.msu dism /unmount-wim /mountdir:c:\mount /commit dism /export-image /sourceimagefile:c:\win81\sources\install.wim /sourceindex:%%x /destinationimagefile:c:\temp\install.wim /compress:max /checkintegrity ) But if you follow more about the update, you'll know that you should integrate the hotfixes in the winre.wim and /resetbase that I ended up doing it for one winre.wim and just went around copy/pasting them into the same architecture - different indexes since the pre-integration sha1 hashes matched... Or you could take s1ave77's advice and just use MSMG's toolkit. It's a lot easier, even if it's intimidating at first.
Looks good to me, though you could add the description if that's what you meant... I would also add /checkintegrity and /verify Example: Code: dism /capture-image /imagefile:g:\temp\install.wim /capturedir:I:\ /compress:max /checkintegrity /verify /name:"Win811Pro" /description:"Some long drawn out boring-ass description that perfectly describes your index during setup"
I haven't played with unattended files very much. You could probably look up a few google searches on win81 versions or advice.
I have it, but "<TimeZone>Central Europe Standard Time</TimeZone>" and "<ComputerName>Compy</ComputerName>" are not accepted?!
Hi, Thanks for this very nice guide... I have a question. Is it OK, Instead of running: imagex /compress maximum /export c:\win81\sources\install.wim * c:\temp\install.wim Run: imagex /compress maximum /export c:\win81\sources\install.wim 1 c:\temp\install.wim So instead of using * I use the only image index number I actually need, which is number 1 Well, I found that it saved some more space on the final DVD... Also I think you could also cover the Dism /Get-WimInfo /WimFile: topic somewhere in the guide. Thanks again!
Guys I need help figuring out how to list indexes in a install.wim from a winpe script. The current /get-imageinfo is much too spammy. Code: Deployment Image Servicing and Management tool Version: 6.3.9600.16384 Details for image : c:\win81x86\sources\install.wim Index : 1 Name : Windows 8.1 Enterprise Description : Windows 8.1 Enterprise Size : 8,642,379,940 bytes The operation completed successfully. I need to get it down to a number and the name Something like this: Code: 1. Windows 8.1 Pro 2. Windows 8.1 Pro with Media Center 3. Windows 8.1 Enterprise 4. Windows 8.1 Enterprise N I'm thinking some sort of FOR command, but I don't know enough about it to help display the piped /get-imageinfo command... Does anyone have any idea how to do this?
... something like this... : Code: for /f "tokens=2 delims=: " %%a in ('DISM /Get-WimInfo /WimFile:"%path2%" ^| findstr /i Index') do ( for /f "tokens=2 delims=:" %%g in ('DISM /Get-WimInfo /WimFile:"%path2%" /Index:%%a ^| findstr /i Name') do ( echo %%a.%%g ) ) OUTPUT: MultiEdition Win 8.1 WIM Code: 1. Windows 8.1 Pro with Media Center 2. Windows 8.1 Pro 3. Windows 8.1 Win 7 x64 WIM (MSDN default) Code: 1. Windows 7 HOMEBASIC 2. Windows 7 HOMEPREMIUM 3. Windows 7 PROFESSIONAL 4. Windows 7 ULTIMATE
Perfect man thanks s1ave77! I'm trying to make like a menu'd setup program that will diskpart prep a selected disk and has options to do wimboot, swm splits application, and index selection I'm not particularly happy with needing tons of diskpart txt files to import depending on which disk you want to install to, but maybe if I work up a first draft of this nonsense, people can help me refine it. EDIT: hmm forgot wimboot images have to be solo indexes and they use their own particular compression, so they wouldn't work in an AIO in any way... But I'll still work out a basic partition menu / dism application / winre copy/reagentc set
Here is the code I do use to extract the wim image information and to store them to variables for further use. This code uses three functions GetTotalWimIndexes - Get Total Number of Indexes present in a WIM Image. GetWimIndexInfo - Get WIM Details (Name, Description, Architecture, Version, SP Build, WIM Edition, OS Install Type) for a particular WIM Index. GetWimInfo - Get WIM Details of all the Indexes present in a WIM Image. The First two function works properly but the third one doesn't work it just shows the index number, don't know what's going wrong. can anyone check it out Code: @echo off setlocal EnableExtensions setlocal EnableDelayedExpansion color 1F set InstallWim=%~dp0Install.wim set WimIndexNo= set WimIndexName= set WimIndexDesc= set WimIndexArch= set WimIndexVersion= set WimIndexVersionSPB= set WimIndexEdition= set WimIndexInstallType= set TotalWimIndexes= cls echo. echo.Using GetWimIndexInfo Function echo. call:GetWimIndexInfo %InstallWim%, 1 echo.------------------------------------------------------------------------------- echo.1 %WimIndexArch% %WimIndexName% %WimIndexDesc% %WimIndexVersion% %WimIndexVersionSPB% %WimIndexEdition% %WimIndexInstalltype% echo.------------------------------------------------------------------------------- echo. echo. echo.Using GetWimInfo Function echo. call:GetWimInfo %InstallWim% echo. pause color 00 endlocal EnableExtensions endlocal EnableDelayedExpansion exit ::------------------------------------------------------------------------------------------- ::------------------------------------------------------------------------------------------- :: Function to Get Total No of Indexes Present In The WIM Image :: Input Parameters [ %~1 : WIM Image Filename ] ::------------------------------------------------------------------------------------------- :GetTotalWimIndexes :: Finding Total No Of Indexes Present In the WIM Image FOR /F "tokens=3 delims=:, " %%i IN ('ImageX.exe /INFO %~1 ^| findstr "Count"') DO (SET TotalWimIndexes=%%i) goto:eof ::------------------------------------------------------------------------------------------- ::------------------------------------------------------------------------------------------- :: Function to Get WIM Image Index Information :: Input Parameters [%~1 : WIM Image Filename, %~2 : WIM Image Index No] ::------------------------------------------------------------------------------------------- :GetWimIndexInfo set WimInfoLog=%~dp0WimInfo.txt if exist %WimInfoLog% del /f /q %WimInfoLog% 2>nul DISM.exe /Get-WimInfo /WimFile:%~1 /Index:%~2 > %WimInfoLog% if exist "%WimInfoLog%" ( FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Name" "%WimInfoLog%"`) DO ( set str=%%a for /f "tokens=2 delims=: " %%b in ('echo !str!') do ( set WimIndexName=%%b ) ) FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Description" "%WimInfoLog%"`) DO ( set str=%%a for /f "tokens=2 delims=: " %%b in ('echo !str!') do ( set WimIndexDesc=%%b ) ) FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Architecture" "%WimInfoLog%"`) DO ( set str=%%a for /f "tokens=2 delims=: " %%b in ('echo !str!') do ( set WimIndexArch=%%b ) ) FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Version" "%WimInfoLog%"`) DO ( set str=%%a for /f "tokens=2 delims=: " %%b in ('echo !str!') do ( set WimIndexVersion=%%b ) ) FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "ServicePack Build" "%WimInfoLog%"`) DO ( set str=%%a for /f "tokens=2 delims=: " %%b in ('echo !str!') do ( set WimIndexVersionSPB=%%b ) ) FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Edition" "%WimInfoLog%"`) DO ( set str=%%a for /f "tokens=2 delims=: " %%b in ('echo !str!') do ( set WimIndexEdition=%%b ) ) FOR /F "tokens=* skip=2 usebackq" %%a IN (`FIND "Installation" "%WimInfoLog%"`) DO ( set str=%%a for /f "tokens=2 delims=: " %%b in ('echo !str!') do ( set WimIndexInstalltype=%%b ) ) ) if exist %WimInfoLog% del /f /q %WimInfoLog% 2>nul goto:eof ::------------------------------------------------------------------------------------------- ::------------------------------------------------------------------------------------------- :: Function to Get WIM Image Index Information :: Input Parameters [%~1 : WIM Image Filename] ::------------------------------------------------------------------------------------------- :GetWimInfo :: Finding Total No Of Indexes Present In the WIM Image call:GetTotalWimIndexes echo.------------------------------------------------------------------------------- for /L %%i in (1, 1, %TotalWimIndexes%) do ( call:GetWimIndexInfo %InstallWim%, %%i echo.%%i %WimIndexArch% %WimIndexName% %WimIndexDesc% %WimIndexVersion% %WimIndexVersionSPB% %WimIndexEdition% %WimIndexInstalltype% ) echo.------------------------------------------------------------------------------- echo. goto:eof ::-------------------------------------------------------------------------------------------
What if you create the diskpart file on the fly, you can then use variables. Code: echo sel dis %diskno% >diskpart.txt echo lis par >>diskpart.txt diskpart /s diskpart.txt So end result is selection of disk & whether it's uefi or legacy...