Like you, i build my winpe without the help of a builder. They are helpfull but i don't want to use external programs. For many reasons.
The first one is that i can do it. The second is that what i make match my need. And my need is not to use winpe. My principal goal is to learn reverse engineering.
I add audio in my winpe 22h2 : [version 10.0.22621.382] and i write this post from this winpe11. WMP is not working. But i write this post and i heard a ".mp3" file in the same time in the session "system" the 13th March2023.
In an old winpe 10, i also add hyperV. I show all my work i, the ennemy site. You can find with a search on the web for "microwinpebuilder".
I write an horrible PS script. I also write a pdf file where i put many other details. they contain some details about the load of the audio drivers.
Maybe you can loose some time to read them.
I stop for this comment about me.
Go back to you issue.
DrvLoad: Unable to load X:\Windows\System32\DriverStore\FileRepository\hdaudio.inf_amd64_9d91e80525dca930 (Error 0x80070103).
Because hdaudio is a "builtin" driver, its ".cat" comes in a "big/full" other ".cat". Without its ".cat", "drvload.exe" can't load it (some detail in my pdf).
"Drvload.exe" calls "drvinst.exe" and it's this last one who really does the installation of the driver.
I think the classics builders (Slore's WiMbuilder2, win10XPE project, Holmes32's PhoenixPE Project ...) use an "modified" code for "drvinst.exe" progam. It's only an hypothesy. I don't care. I don't need.
I look in my script and i see this :
# 1- copie des cat du pilote hdaudio.sys? oui pour build 14393
$catFileHdaudio = "Microsoft-Windows-Desktop-Shared-Drivers-onecoreuap-Package~31bf3856ad364e35~amd64~*.cat"
affichage "Copie du .cat $catFileHdaudio"
copy-item $(join-path $gSrcCatRoot $catFileHdaudio) -Destination $gMountCatRoot -Force
# V0.0.0.2.0 : adaptation pour build 14393, retrait de la partie variable dans les noms de répertoire
#$repHdAudio = join-path $Ref_ISO_Windows "windows\System32\DriverStore\FileRepository\hdaudio.inf_amd64_363c98295dd17f08"
# 2- copy and DISM /ADD-driver
$nomRep = "windows\System32\DriverStore\FileRepository\hdaudio.inf_amd64_*"
$rep=Resolve_Copy_Add_Driver "hdaudio.inf" $nomRep $Ref_ISO_Windows
The logic i follow for the installation of "builtin" driver :
- search the "big" ".cat" file
- copy it in the ".cat" directory.
- During the build of winpe, i launch the command : "DISM ... /addDriver ..."
Maybe it's not the best way but i works for me (and i never see other builders offering hyperv in a winpe ).
I have installed the ks.inf driver, but there is no ks.inf file in the folder containing the hdaudio.inf.
if you look at in hdaudio.inf file you see :
; Include/Needed OEM sections
%HdAudio.OEM.DeviceDesc% = HdAudOEM.CopyFiles
%HdAudio.OEM.DeviceDesc% = HdAudOEM.AddReg
; Include/Needed MS internal sections
%HdAudio.Settings.DeviceDesc% = HDAudio.SysFx
%HdAudio.Settings.DeviceDesc% = HDAudio.EPProperties
Because the installation engine of Ms needs these 2 ".inf", you must copy these files in "inf" directory during the building step.
There are some links between "drivers" hive-"driverstore" directory-"inf" directory.
Because i stop building Winpe with the original hives of Winpe since a long time, i can't remember all the needs for you.
My choice : i use software and drivers hives from install.wim : and it's the end of many issues for me.
Maybe my pdf and my Ps script can give you some information about the driver installation.
I never find and read some lines of text about how classic builders do the job. Because i write my script, i can adapt when an issue occurs.
C:\>net start mmcss
Error 577: Windows cannot verify the digital signature for this file
You don't use the "x:" letter
I think the error comes from the driver loaded by the start of the service. Not sure.
Procmon is your best friend to investigate this point.
I'm happy to help you. And more happy if we can share some result.
BTW : i post in the ennemy site the result of 3 months of my work about the "sound bug" in winpe11.