Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

MsiGetProperty not working in InstallShield2010


2 replies to this topic

kretmatt

kretmatt
  • Full Members
  • 10 posts

Posted 19 August 2010 - 08:25

Hello,
I have a Basic MSI Project created with InstallShield 11.
Now we upgraded to InstallShield2010.

We always used the following line to read a Msi property in our InstllScript:
CODE

nValueBuf = 3;
MsiGetProperty(ISMSI_HANDLE,"ProductName", svProductName, nValueBuf);


Now in InstallShield2010 the function MsiGetProperty returns ERROR_MORE_DATA.

We changed the line to this to avoid this error:

CODE

nValueBuf = MAX_STRING;
nvReturn =  MsiGetProperty(ISMSI_HANDLE,"ProductName", svProductName, nValueBuf);


The problem is that the variable svProductName is still empty, after the function call.
Furthermore the help says:
QUOTE

ISMSI_HANDLE is not supported in Basic MSI projects, and is not supported in InstallScript custom actions.

But this was also in the help of InstallShield11 and it worked perfectly till the upgrade to 2010.

Could somebody give me a hint!
Please!

Thank you in advance.

Regards,
Matthias

kretmatt

kretmatt
  • Full Members
  • 10 posts

Posted 19 August 2010 - 08:48

UPDATE:
I found out that it is working when I set the Custom Action to "Immediate Execution" instead of "Deferred Execution".

But this is not what I want. I need to execute the funktion after all files are installed --> Deferred Execution After InstallFiles.

unsure.gif

kretmatt

kretmatt
  • Full Members
  • 10 posts

Posted 19 August 2010 - 12:38

I Found it my self.
Maybe somebode will have the same problem. Have a look here
and here

Regards
Matthias