GetSeqNumber() |
This function is used internally by MAKEMSI whenever you use one of the MAKEMSI commands than needs to schedule a custom action relative to another.
You can call this function directly if you need to do your own scheduling. You must not cache the value or some other process might use the same number, use the value so any subsequent process don't reallocate it.
The function returns a sequence number (or displays an error message and terminates) and takes these parameters:
Note that the function does some table/row manipulation itself and so can't be used everywhere, for example it can't be used within a "Row" command block. You will probably get a cryptic message if it fails for this reason. The example below uses a VBSCRIPT variable to hold the value so the "row" command can access it.
The Specification Explained |
Basically you describe a range of valid values and whether you prefer the value to be chosen from the lower (default) or higher end.
The range should be specified in the format "lower - higher". Either value can be omitted, be specified as an integer such as "1000" or the name of an action such as "InstallFiles". The default value for the lower end is "1" and for the higher "32767" and leading and trailing spaces for each are stripped. The minimum and maximum values can be returned as the range is inclusive.
By default MAKEMSI will choose a number as close as possible to the lower end, if you wish it to be as high as possible then begin the specification string with "<".
Some Examples:
You should of course be aware of what your script does, for example if it moves a custom action that you have already sequenced other actions relative to then that would probably be "bad"!
EXAMPLE |
<$Table "InstallExecuteSequence"> #( ;--- Need to do this or "SourceDir" null if UI=none or basic ------------ dim RsSeqNumber : RsSeqNumber = GetSeqNumber("InstallExecuteSequence", "CostInitialize-", 1) <$Row Action="ResolveSource" Condition=^<$CONDITION_INSTALL_ONLY>^ *Sequence=^RsSeqNumber^ > #) <$/Table>