cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Brandon_Lowe
Level 6

Need help unscrambling product code

Here is my MSI newbee question of the week.
I need to read the registry and look at the upgrade code of a product. From that key I will get the product guid so I can go get the version of that product. I have no problem reading the reg and getting info from it.
My question is,
Does installshield or windows installer(MSI) have a function that unscrmbles the product guids that are written to the register. When I look the guids have had each section reversed. Why do they do this?
Does anyone have a code clip for doing this?

Thanks
Brandon
Labels (1)
0 Kudos
(2) Replies
RobertDickau
Flexera Alumni

You generally shouldn't read the registry directly to get MSI information, if you can avoid it. If you have an upgrade code, you can call MsiEnumRelatedProducts to get product codes for installed products with that upgrade code, and then do whatever you want with the product code (call MsiGetProductInfo, for example).

A detect-only major upgrade item will also take an upgrade code and return one or more product codes.
0 Kudos
Brandon_Lowe
Level 6

Thanks for the help I'm now using MsiEnumRelatedProducts and MsiGetProductInfo and it is working great.

I have one other question.
I have a chained MSI that I'm installing. Is there a function I can call to get the version from that MSI?
I have tried to search for the answer but all the answers are solutions for outside of installshield using SQL or C++. I would hope that installshield would have a function for this.

Brandon
0 Kudos