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

How do I get my release flags in InstallScript?


3 replies to this topic

Skihog

Skihog
  • Members
  • 2 posts

Posted 15 February 2002 - 23:28

I am using release flags heavily to distinguish between all of my different build types.  So I would like to do certain things in the InstallScript based on these Release Flags.  My problem is that I can't seem to get to them.  I tried putting the statement:
MsiGetProperty(ISMSI_HANDLE, "ISReleaseFlags", svReleaseFlags, nvSize);
into my OnBegin event, but it didnt receive anything.  Any ideas?

Now for my ignorance to show: custom actions.  It looks like I could possibly use a custom action to get the release flags for me, from this snipit out of the help, "The second, and more robust way to set a condition on your custom action based on release flags is to author a call to MsiGetProperty within your custom action."  If I have a custom action that does this, can it store the release flags into a global string that can then be accessed from the rest of the InstallScript? or can I have the custom action set a property that I can use to know what is going on?

Also where do I put the custom action in the sequence so that when I start OnFirstUIBefore I know what release I am running?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 17 February 2002 - 09:39

Your script code should work, given that you initialize nvSize to the max size of the string before you call MsiiGetProperty. In nvSize you specify the maximum number of bytes you want to get returned from the function. After the function call it tells you how many bytes have actually been returned. Looking at the return code of the function call would also hekp to detect and diagnose any problems.

Skihog

Skihog
  • Members
  • 2 posts

Posted 18 February 2002 - 15:06

Thanks!

My new problem is that since [Product Configuration Flags] are so similar that they even share the same help with release flags, I assumed I would retrieve these with ISReleaseFlags, but I don't. Any idea what, if any, property I can retrieve for the Product Configuration Flags (release flags on the product level)?


Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 18 February 2002 - 19:28

Hmmm, I think this should work. I haven't tried in ISD, but I believe in InstallShield for Windows Installer (the predecessor of Developer) it used to work.