7 Replies Latest reply on Feb 1, 2011 8:44 AM by afurman NameToUpdate

    NSHScript parameters (not cli) and Error: String index out of range: 0

      I have a simple nsh script that expects 3 parameters in the form of script.nsh "string1" "string2" "srting3"

      inides the script:

       

      BL_SOURCE=$1

      BL_TARGET=$2

      MODE=$3

       

      Simple, right?

       

      So I added NSHScipt and in Parameters Tab I specified:

       

      Parameter 1:BL_SOURCE,flag none,flag usage optional, default value, required, editable

      Parameter 2:BL_TARGET,flag none,flag usage optional, default value, required, editable

      Parameter 3: MODE,flag none,flag usage optional, default value, required, editable

       

      Then I created deployNSHScriptJob with all default setting using the NSHScript and all parameters with default values show up correctly and I can edit the values if I want to.

       

      But every time I attempt to run the job it fails right away with Error String index out of range: 0

      I don't see any logs created in Transactions for this job either so I have no troubleshooting data except that I am sure its caused by parameters because when I change the script not to use parameters and use hard-coded values instead it works but I need to make it work with parameters.

      I have a feeling its something simple, what am I doing something wrong?

      Any ideas? TIA!