I just got stuck with the problem where an update of my software on windows mobile which contains a com dll gets wrong (Default) registry entry in InproceServer32’s default key.
The key was something like
HKEY_CLASSES_ROOT\CLSID\{6777246F-2FAC-4376-BAB6-FF81EDFD3439}\InprocServer32
and value being inserted by CAB was
\Windows\FilesToBeDeleted\TMP0004.tmp
This similar issue was experienced by someone else here in this post
but no solution was posted in replies.
Anyway, one good and complicated solution is to write your own installer code like this one
The solution I used was much easier. In my CAB inf file I inserted the reg key with the value that it really should have, like this
[RegKeys]
"HKCR","CLSID\{6777246F-2FAC-4376-BAB6-FF81EDFD3439}\InprocServer32","","0x00000000","\Windows\MyDll.dll"
This solved the problem. After installation/updation the right DLL value was inserted and new DLL started to work as usual.