When re-packaging (using package studio) SAPGUI 6.40 I kept getting the above error on install for 2 ocx files - ICjoin.ocx and wdbdadptjoin.ocx. The only way to fix this was to remove them from the install, compile then re-add the files and ordered the registration so that wdbdadptjoin registered before ICjoin.
Comments