Using synchronicity's excellent wimlib-imagex it is possible to
So how about just extracting a minimal fileset and running DISM - for example just extracting the minimum files from the .wim required for DISM to
Anyone have any experience with this? I've done a quick test with just registry files and DISM failed. The DISM log is not helpful (for me).
Misty
_____________________________________________________________
EDIT
Getting closer by extracting the following files/directories and then running DISM -
\Windows\System32\SSShim.dll
\Windows\System32\config\
\Windows\servicing\
\Windows\System32\Dism\
\Windows\System32\wdscore.dll
Deployment Image Servicing and Management tool Version: 6.3.9600.16384 Error: 161 The directory D:\MistyPE\Projects\Cache\Adk.workspace4\mount\Windows does not appear to be a valid Windows directory. Ensure that the /WinDir option that is specified is valid. For more information, refer to the help by running DISM.exe /WinDir /?.And just some of the errors from the DISM log file -
2018-01-04 09:33:49, Info DISM DISM Provider Store: PID=3188 TID=196 Getting the collection of providers from a local provider store type. - CDISMProviderStore::GetProviderCollection [3188] [0x80070002] FIOReadFileIntoBuffer:(1415): The system cannot find the file specified. [3188] [0xc142011c] UnmarshallImageHandleFromDirectory:(511) [3188] [0xc142011c] WIMGetMountedImageHandle:(2568)_____________________________________________________________
EDIT ON 5th Jan 2018 at 07:42am
I've made this edit to try and clear up some of the ambiguity in my original post. Sorry to all involved so far from post #1 to post #22 for my poor wording which has led to misundertandings. In my defence, I have been up late coding and getting by on an average of about 4-5 hours sleep per night for nealy two weeks. Not helped by an excess of alcohol over the New Year period!
My original goal was -
1] use a full Windows Host OS with an ADK installed (initial tests on 64-bit Windows 8.1 Update Host OS with the ADK for Windows 8.1 installed).
2] use wimlib to extract the minimum files from winpe.wim (.wim is from the ADK already installed on the host OS) that will allow me to complete step 3 (see below).
3] use the full DISM (from the ADK) to apply an Optional Component (aka Package) to the files extracted in step 2].
4] use wimlib to inject any added/modified files created in step 3] back into winpe.wim.
If this is possible then by extracting just a few files instead of the full contents of winpe.wim there will be a significant increase in the speed of the extraction process. The injection process should also be significantly faster than building a new .wim.
DISM appears to check for a number of files in the mounted (or in my case extracted) .wim file and if these files are not found it will error. For example -
...Error: 161 The directory MY.PATH\mount\Windows does not appear to be a valid Windows directory....And when more files were extracted from winpe.wim some progress was made and DISM was able to recognise the extracted files as a WinPE and started the package installation process (but still resulted in an error) -
...Processing 1 of 1 - Adding package WinPE-WMI-Package~31bf3856ad364e35~amd64~~6.3.9600.16384 An error occurred - WinPE-WMI-Package Error: 0x80070003 Error: 3 The system cannot find the path specified.The misunderstanding -
Due to the poor wording and ambiguity of my original post the goal was taken to be finding the minimal DISM dependencies required to run DISM to add an Optional Component/package to a (fully?) extracted winpe.wim file. Maybe facilitating the package installation process without the need to install the full ADK.
Erwan.l summarises the confusion in post #19
Indeed there seems to be a confusion (at least i was confused at first) between 2 topics :
#1-which minimal file set is needed on the host to run dism (i focused on that topic while adopting a developper approach : can we come with a "tiny" / minimal / new dism based on dismapi.dll only to do some basics)
#2-which minimal file set in needed in the wim file (or vhd i guess) to be able to run command such as add-package or add-driver
Erwan then goes on to really hit the nail on the head in terms of future development and my new goal -
Actually both topics may be connected : dism.exe is a black box and there may be some un necessary extra steps in there.
A new custom dism.exe could help achieve both goals : less dependency on the host and less logic when mounting/updating a wil/vhd file.
So apologies again for any confusion I caused. But then lets not forget that this has led to more interesting experiments
Misty