PDA

View Full Version : Getting MSI Properties In LUA script


richmcc
08-12-2008, 11:02 AM
I am trying to get the ProductName property in a LUA script Custom Action.
I am using the following code:

Product_Name = MSI.GetProperty("_hinstall","ProductName");

I keep getting an error:

4529: An inactive or invalid handle was supplied.

I have tried it with and without quotes around the parameters, I still get the same error.

What am I Missing:huh :huh

richmcc
09-26-2008, 03:55 PM
Just in case anybody else is does the same thing. The problem I was having was that i was supposed to be a capital I

Product_Name = MSI.GetProperty("_hinstall","ProductName");

jassing
09-26-2008, 11:48 PM
Just in case anybody else is does the same thing. The problem I was having was that i was supposed to be a capital I

Product_Name = MSI.GetProperty("_hinstall","ProductName");

myvar is not the same as myVar or MyVar

Just so you are aware -- lua is case sensitive -- so anywhere you have a variable -- case is important...
as you discovered, there is a capital 'I' _hInstall. The help file is very accurate on these things.

Glad you found the answer.