timbojones
08-10-2006, 07:40 PM
I have the following code in my script:
If %USER% Not Equals "" Then
Set Variable %ARGS% to "-username %USER%"
End
If %PASSWORD% Not Equals "" Then
Set Variable %ARGS% to " -password %PASSWORD%"
End
The second Set Variable has the "Append to Existing Value" box checked. Note the space at the beginning of the string. If %USER% and %PASSWORD% are both defined, then at the end of this block, %ARGS% = "-username foo-password bar". The space has been stripped out. The same thing happens if I put the space at the end of the first Set Variable command, or if I append a space in its own Set Variable command.
How can I fix this?
If %USER% Not Equals "" Then
Set Variable %ARGS% to "-username %USER%"
End
If %PASSWORD% Not Equals "" Then
Set Variable %ARGS% to " -password %PASSWORD%"
End
The second Set Variable has the "Append to Existing Value" box checked. Note the space at the beginning of the string. If %USER% and %PASSWORD% are both defined, then at the end of this block, %ARGS% = "-username foo-password bar". The space has been stripped out. The same thing happens if I put the space at the end of the first Set Variable command, or if I append a space in its own Set Variable command.
How can I fix this?