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 in Installscript custom action


1 reply to this topic

oceanpearl

oceanpearl
  • Members
  • 10 posts

Posted 01 June 2005 - 03:30

I want to create a custom action that gets "SomeProperty" and passes this property to kickstart another msi installation.

MsiGetProperty(hMSI, "SomeProperty", sInstallDir, nSize);
MessageBox(sInstallDir, INFORMATION);

LaunchAppAndWait("setup.exe", "/v\"/qr INSTALLDIR=" + sInstallDir +"\"", LAAW_OPTION_WAIT);

The problem is that the value of "SomeProperty" is "[ThisDirectory]". For example if [ThisDirectory] is pointing to "c:\ProgramFiles\test", I want to pass "c:\ProgramFiles\test" not the unqualified [ThisDirectory]to setup.exe.

What's happenning is when setup.exe is run, it looks for directory "[ThisDirectory]" instead of the directory "c:\ProgramFiles\test" which is really what we want.

I see it as such a common task in installscript, so I must be missing something here. Thanks.






oceanpearl

oceanpearl
  • Members
  • 10 posts

Posted 01 June 2005 - 05:17

Found it!

What I really should have done is call MsiGetTargetPath() in installscript to have the directories resolved for me.