PDA

View Full Version : RegisterProgIdInfo fails



cnegrila
07-11-2006, 10:48 AM
Registering the ProgID information associated with an extension seems to be failing all the time for me in IS 12 generated MSIs (from Basic MSI projects). If I create a similar project with the same ProgID info in IS 11.5 it works just fine.

Here's what the MSI log looks like. It seems like RegisterProgIDInfo is failing but I don't understand the cause. Is there a way to figure out the cause of failure from this log?

MSI (s) (F0:FC) [11:11:34:523]: Doing action: RegisterProgIdInfo
Action 11:11:34: RegisterProgIdInfo. Registering program identifiers
Action start 11:11:34: RegisterProgIdInfo.
MSI (s) (F0:FC) [11:11:34:539]: Note: 1: 2205 2: 3: Class
MSI (s) (F0:FC) [11:11:34:539]: Note: 1: 2228 2: 3: Class 4: SELECT DISTINCT `BinaryType`, `ProgId`, `Class_`, `ProgId`.`Description`, `ProgId`.`Icon_`, `ProgId`.`IconIndex`, null, `Component`.`RuntimeFlags`, `Component`.`Component` FROM `ProgId`, `Class`, `Feature`, `Component` WHERE `ProgId`.`Class_` = `Class`.`CLSID` AND `Class`.`Feature_` = `Feature` AND `Class`.`Component_` = `Component` AND ((`Feature`.`Action` = 1 OR `Feature`.`Action` = 2) OR (`Feature`.`Action` = 4 AND `Feature`.`Installed` = 0) OR (`Feature`.`Action` = 3 AND (`Feature`.`Installed` = 1 OR `Feature`.`Installed` = 2 OR `Feature`.`Installed` = 4)) OR (`Feature`.`Action` = NULL AND (`Component`.`Action` = 1 OR `Component`.`Action` = 2) AND ((`Feature`.`Installed` = 1 OR `Feature`.`Installed` = 2 OR `Feature`.`Installed` = 4))))
Action ended 11:11:34: RegisterProgIdInfo. Return value 0.

The result of this is that the extension gets indeed associated with the executable, however no ProgID info (like the correct document icon and description) gets stored in the registry.

Any suggestion would be greatly appreciated. I've been batling deeper and deeper with this issue for the better part of a week already...

MichaelU
07-11-2006, 11:20 AM
Ahah, probing those error numbers, this all falls into place.
2205 is "Database: [2]. Table does not exist: [3]."
2228 is "Database: [2]. Unknown table '[3]' in SQL query: [4]."
So it's complaining that the Class table is not available.

For IS12 we started pulling empty tables during build (by request of the MSI team) and apparently missed a MSI implementation dependency: despite the fact that no data was stored in the Class table, MSI needed it to be present. You can fix this immediately by editing Support\settings.xml and adding the following element under EmptyTableDisposition:
<Class MSI="Ref:ProgId" MSM="Ref:ProgId">Required for RegisterProgIdInfo action</Class>

Be careful editing this file as XML errors here can render parts of the IDE unusable (save a backup!). Please let me know if this resolves the issue, or if my directions are unclear. If it does not resolve the issue, check the log for more tables like Class above. Also if this does not cause the Class table to be kept, you can try "Keep" instead of "Ref:ProgId" in the above change.

Thanks!

cnegrila
07-11-2006, 11:57 AM
This worked like a charm! Thanks a lot! I would have never figured this one out on my own! :)

It would be a good idea to make an IS update with this though, since it looks like most people using ProgIDs will run into this...

MichaelU
07-11-2006, 12:49 PM
I'm glad the fix worked for you! I've filed a report on this to be tracked under IOC-000051711, but I expect anyone reading this will be more interested in just applying the XML tweak from above. Since the fix is so much simpler than the diagnosis, I agree we should push this as an update, even though I'm not convinced it's common for the Class table to be empty while ProgID isn't.

coJeff
07-27-2007, 04:00 PM
Ahah, probing those error numbers, this all falls into place.
For IS12 we started pulling empty tables during build (by request of the MSI team) and apparently missed a MSI implementation dependency: despite the fact that no data was stored in the Class table, MSI needed it to be present. You can fix this immediately by editing Support\settings.xml and adding the following element under EmptyTableDisposition:
<Class MSI="Ref:ProgId" MSM="Ref:ProgId">Required for RegisterProgIdInfo action</Class>



Any chance of this ever being pushed out to us? I tried it but it didn't work for me. Unless of course I didn't edit the xml file correctly.

MichaelU
07-30-2007, 12:53 PM
It's included in InstallShield 2008, so at a bare minimum if you have an evaluation (or full purchase) of that installed, you can compare the settings.xml file. That said, there's nothing too tricky about this edit, so are you certain whether this is the same problem? If you look at your built MSI in the direct editor, do you have a ProgID table and not a Class table?