PDA

View Full Version : Basic MSI: ProductLanguage of installed product.



Holger_G
07-03-2007, 07:46 AM
Hi.

How can I get the ProductLanguage of an installed Basic MSI product from an application?
Can I use MsiGetProductProperty or any other MSI API calls?

Thanks
-Nick

RobertDickau
07-03-2007, 08:35 AM
Will MsiGetProductInfo + INSTALLPROPERTY_LANGUAGE work?

Holger_G
07-04-2007, 02:38 AM
Thanks Robert, that seems to work basically.

But it always returns 0 for the language of my installed project, instead of 1033 or 1031 or any other supported language of my project.

Maybe I´ve done something wrong?

RobertDickau
07-05-2007, 10:08 AM
Hmmm, no, I don't think you're doing anything wrong. The technique seems to work for a single-language package, but since a multi-language package created by InstallShield is a base package plus a bunch of language transforms, it seems the base package is registered as language-neutral.

MsiGetProductInfo + INSTALLPROPERTY_TRANSFORMS lists the applied language transform (where the language code is part of the file name), though of course takes a bit of care to parse out the language code.

Cleverer ideas gratefully received...