Because my english is so poor, i prefere write a long explanation with short sentences.
I create a VM (generation2 with UEFI) in HyperV.
I disable snapshots ( too many issues with the differential file )
I create a VHDX file (fixed size, GPT/UEFI)
I create the two partitions ( ESR fat32 and System ntfs )
I create the BCD for UEFI
I expand my "customised" winpe in the "system" partition with dism /apply....
So, in the VHDX file, i get a winpe in Flat mode.
Start is OK.
Now i install an application which modifies "files, system hive, software hive".
Because Flat mode, files are ok for the next boot.
System hive is easy to backup and to modify for the next boot.
Software hive is easy to backup for the next boot. No possibility to recopy it at this time because the file is locked
Now i need to boot on a second "small" winpe in the same VHDX file for recopying the two saved hives.
I create a new directory "x:\newWinpe" and expand a second small winpe.
I create a new entry in the BCD file for this second small winpe.
After boot, i can choose between the two "Flat" winpe.
I choose the second small winpe.
I can recopy the two hives in the first big winpe.
And now, when i boot on this first winpe, i retrieve the "new" application. And it works well.
My question : for the second "small" winpe, i want to use a boot.wim (not expanded) file. How can i modify the BCD file for that?
Thank you to give me some ideas.