you said that "ExpEnvVar.exe will support what you are after."
The fact that your PE is working fine means that ExpEnvVar.exe, along with the tag file, are doing their job. Remove either of them and like I said you will completely stuff up your PE....So remove the tag file and you will have shortcut and registry problems in your PE.
When I remove MEDIA.DRIVE from the root of the UFD, I get the mentioned message on the boot, but after that it seems that everything is working fine.
That's right, in many of my tests I don't have MEDIA.DRIVE file in the root of UFD, and yes, I get the message how that file is missing, but after I click on the OK button I get all schortcuts fine and everything is working fine. How is that if you say that it is needed?
Maybe there is a way that you find out in which configurations it is needed during build and only in that case that it is set for checking on the boot.
WimBoot now updated as well.
If I understand you correctly, the %CDDrive% variable contains the drive letter where MEDIA.DRIVE was found by ExpEnvVar which will be my UFD.
Is your ExpEnvVar.exe executed and set the mentioned variable before WimMount.cmd starts?