cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
jayakumarn
Level 5

Product Code problem!

Hi All,
I am using the following code in my script but it always returns null.

nBuffer=64; //number datatype
svPropvalue=""; //string datatype
MsiGetProductInfo("{3B32FB6E-6FF1-4A1F-A3E2-66B2C2AF16E6}", INSTALLPROPERTY_LANGUAGE, svPropvalue, nBuffer);

MessageBox(svPropvalue,WARNING);

here the messagebox is displaying only empty , i don't know why it returns empty always !!!any idea!!!

I think this problem is due to product code i have entered. The Product code i have entered is from selecting

Installation Designer -> General Information ->Productproperties->Product Code.

Can anyone help me!
Labels (1)
0 Kudos
(4) Replies
sachin_a_pawar
Level 4

Hello jayakumarn,


The MsiGetProductInfo works for only installed product.

Please verify the product code you specifies is the product which is installed already.

Thanks
Sachin Pawar
0 Kudos
jayakumarn
Level 5

No not yet..
what is is the prolem is i want to get the selected location by the user so i need to use the product code of that particular product to get the selected language ...
EG:
MsiGetProductInfo("{ProductCode}", INSTALLPROPERTY_INSTALLLOCATION, svINSTALLDIR, nBuffer);


How to get the product code of the installing application ???????:confused: :confused: :confused:
0 Kudos
sachin_a_pawar
Level 4

Hello,

Please try ProductCode / PRODUCT_GUID property.

Thanks
Sachin Pawar
0 Kudos
Charlie_McMahon
Level 2

Not 100% sure on this one, but you could try removing the dashes (-)

So {3B32FB6E-6FF1-4A1F-A3E2-66B2C2AF16E6}

Becomes {3B32FB6E6FF14A1FA3E266B2C2AF16E6}!!

Charlie
0 Kudos