Due to the amount of time I've been spending coding and testing, I will be (attempting) to take a break for a week or two. I will be checking in on the forum and I can't rule out being sucked back in by interesting discussions
Before taking a break I thought I'd share some thoughts related to WinPE / Packages / (Tiny)DISM.
Some backgroundAt this point in time, in order to add certain functions to a Windows PE, Optional Components are a necessary evil. Whilst it is theoretically possible to add a feature without an Optional Component, it's not always practicable. Think about the WinPE-NetFx package for example - who wants to trace all of the dependencies for that. And where would the source files be obtained. And each Windows PE build may require different dependencies.
The most convenient method remains downloading and installing one of the Windows ADK's. For the majority of people this means downloading the full ADK using the adksetup.exe installer - with lots of features that are likely to be unnecessary. For WinPE only functions we can narrow it down to just the following installers (and their .cab dependencies - which vary between ADK versions) -
- Windows Deployment Tools-x86_en-us.msi
- Windows PE x86 x64 wims-x86_en-us.msi
- Windows PE x86 x64-x86_en-us.msi
That's still a lot of bloat if only -
- A few Optional Components are required
- Only a 32-bit WinPE is required
- Only a 64-bit WinPE is required
Also, it might not be desirable to install the Assessment and Deployment Kit. Or more than one ADK for Windows 10 may be required.
So what about extending JFX's excellent Get WAIK Tools (discussed and available
here) to download just the required element(s) - for example DISM (and dependencies), winpe.wim (32-bit or 64-bit or both), individual Optional Components, etc.
Get WAIK Tools already has an option to download part of a file. Get WAIK Tools uses (or appears to use) this approach to facilitate downloading individual elements from some ADKs - presumably using hardcoded links in the program.
I'm not sure whether Get WAIK Tools is redistributable - I'll ask on the support topic on MSFN. CURL may be a viable alternative if not.
So we have Erwan's nice command-line (and very easy to script) TinyDISM.
And we have my new little PEBakery/WinBuilder ADK project.
If I can find a means of identifying which bits (offsets) of the relevant .cab contains the required file then it may be possible to -
- Download just the part of the .cab containing the required file
- Decompress the bit of the file downloaded above (remember it's been partially extracted from a compressed .cab and not decompressed during the download)
- Use it as required - e.g. in a PEBakery/WinBuilder project.
Any thoughts on the viability of this approach?
And suggestions re finding the file offsets in a .cab and decompressing it afterwards. Looks like Get WAIK Tools may already handle the decompression during the extraction.
Misty