Well, lookie here

This works WONDERFULLY.

My package command line looks like this:
Code:
package.exe [$target=www] [$site=xxx] [$files=yyy] [$pstools=zzz]

------
Where [###] defines optional parameters.
Not all of the parameters are used all of the time.



And the processing goes thusly...

Code:
;Load variables from command line, if they are present

$options_array = Split($exeparams,' $')
For Each $element In $options_array
$x = SubStr($element,InStr($element,'=')+1)
Select
Case InStr($element,'target=') $target = Lcase($x)
Case InStr($element,'site=') $site = Lcase($x)
Case InStr($element,'files=') $files = Lcase($x)
Case InStr($element,'pstools=') $pstools = Lcase($x)
EndSelect
Next

Thanks for pointing me in the right direction!

Best regards,

Tim ==