Use the $execmdline variable in your script and parse it to get the variable you need. The kix editor explains this better.

In the editor go to Help and choose .EXE packager help. Then choose Command Line Switches. This should explain the process but it's a little vague. I use this feature in a couple of scripts and it works well.