No offense taken here anyway - we are here for collaboration not flaming :)
My recent problem with different OS behavior regarding COM port settings for GPSID on smartphone (if using "merge packages") has now at least a usable workaround.
I am not sure which of the two observed behaviors is really the right one (so to allow any HW port listed or just those that are listed under HKLM\Drivers\RegisteredDevice Keys BTD_COMx). Anyway the workaround is to simply add the keys so that they are in line with the referenced supported ports for connecting external serial devices at:
I had to add:
supplemental to the already defined generic part:
Now it works as needed - still different with and without "merge" packages". I traced the registry access with reglogger and tried to debug the .netCF with .netCF powertoys but no real hints from the latter.
Reglogger has revealed that the sequence of accessing the HKLM\Drivers\RegisteredDevice is consistently different in both cases but if an application reacts differently if the sequence of access is different then I judge this as a fault of the application not the OSB.
It puts however light on a level deeper than the pure registry hives's data. The sequence of hive-population in a subkey seems to have sometimes an influence on applications behavior. To track this it could be helpful to have the merged package .rgu saved to a place for investigation.
I also noticed by comparing the active hives content that the sequence of loading drivers in the HKLM\Drivers\Active is consistently different as well. Looking up MSDN it tells that the drivers are loaded using the value of "Order" in their relevant driver entry in HKLM\Drivers\BuiltIn\<drivername>. However are there many drivers that have the same value set in "Order". MSDN tells that sequence of loading is then "undefined". It is however possible that in this case the order of getting the driver data from the HKLM\Drivers\BuiltIn\ may leave a trace in the sequence for the drivers with the same "Order" value. Probably another reason to see potentially different OS behavior in case the "merge packages" option is used.