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

Condition Syntax


7 replies to this topic

Ian Hill

Ian Hill
  • Members
  • 3 posts

Posted 12 April 2002 - 14:44

Is there a maximum number of characters that can be used in a condition?

Shridar

Shridar
  • Members
  • 11 posts

Posted 16 April 2002 - 21:11

Yes. The limit is 255.
Thanks,
Shridar.

Lindz-

Lindz-
  • Members
  • 5 posts

Posted 07 August 2003 - 17:08

When is this since!?!, I have a very big install (30+ Features, over 1000 Components, 50+ dialogs, 2 c++ dll's, 75+ custom actions and many many conditions based upon these) which was developed with IS 2.03, I've just converted to ISD8 and all looked good with the conversion until I needed to extend one of the custom actions and I now find it's length is well over 255 chars, but it still works, however I can't modify it or add too it, or even remove from it!, if I do I'm told that its too long and it changes until i refresh the field and then it goes back to it's original (well above 255 chars) condition.

This is a hugeeeee problem for me, does anyone have any advice?


Lindz-

Lindz-
  • Members
  • 5 posts

Posted 07 August 2003 - 19:43

I logged an incident with IS for this, lets see what they say, in the meantime I would love to hear your opinion on this Stefan biggrin.gif

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 08 August 2003 - 13:46

Okay, this is actually two questions:

Q1: Is there a limit for the length of a conditional statement in MSI?
A1: I don't think there a limit officially documented. I haven't looked at the source code to see if there's some maximum length. One limit may be the maximum string length for the Condition column, as defined in the MSI database schema.

Q2: What is the maximum length for a condition string that the edit field in the InstallShield IDE supports.
A2: I don't think there's a documented limit, and it may depend on your InstallShield version. If you can't enter it in the usual views, you can try the direct editor instead.

Another option would be to simplyfy your condition statement, by using variables (global properties) that you set to parts of the expression. This would also make it more readable.

Lindz-

Lindz-
  • Members
  • 5 posts

Posted 08 August 2003 - 15:42

It seems ISD8's IDE is limited to 256 chars for the condition statement sad.gif - I've logged a bug for it with them and we'll see what they say, on IS2.03 they issued a warning but didn't restrict you, this restriction is also now imposed through the Direct Editor! however if you modify with ORCA after building it works fine.... I also cut my condition statement down from 567 chars to around 320 chars by using 3 letter acronymns for each feature I was checking the conditions on, but I was still too long, however I solved the problem in the end by cloning the custom actions and reacting for the conditions I couldn't fit in the first statement, this is a horrible solution and your idea to cut down the condition statements is the best but would mean I would have to completely re-design the install which at this point is not an option (usual story). Anyway for now I have a workaround, thanks for your comments.

And Maximum Kudos for this site Stefan, its invaluable.

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 09 August 2003 - 11:38

The condition column of both the Condition table (feature conditions) and the Component table, are specified as String[255] in the MSI 200 schema.

Quote from the docs:

The installer does not internally limit the length of columns to the value specified by the column definition format. If the data entered into a field exceeds the specified column length, the package fails to pass package validation. To pass validation in this case, either the data or the database schema must be changed.

Lindz-

Lindz-
  • Members
  • 5 posts

Posted 11 August 2003 - 20:47

Excellent thanks for the info, I should try and break them up to under 256 char conditions.