I have written a script that will log into our system using the pulselauncher.exe. I have 3 realms. Two of the realms are one word and the other one is two words. How do I enter this as part of the -r option for pulselauncher.exe? I have tried single and double quotes and even an underscore for the space. None of these worked. The error I get is:
A parameter is invalid.
What is the command you are using? I ran a quick test using the realm "TEST REALM" and this seems to pass properly when using double quotes.
Here is a sample of what I have tried:
"c:\Program Files (x86)\Common Files\Juniper Networks\Integration\pulselauncher.exe" -u UserName -p Password -url https://ourvpn.test.com -r Test Realm
I also tried it with quotes and still get the 'A parameter is invalid.' error message.
"c:\Program Files (x86)\Common Files\Juniper Networks\Integration\pulselauncher.exe" -u UserName -p Password -url https://ourvpn.test.com -r "Test Realm"
So for giggles and grins, I took the command that I am running from my vbscript and pasted it into a command prompt. It worked! I did have to use the quotes around the realm. I guess it is something in my script.
I don't think that is it. If I run the exact command from a command prompt, including the quotes around pulselauncher.exe, it will work.
Interesting. Please let us know the outcome and if there is any further problems.
I got it resolved. It was the way I was running the program. I changed it from:
ReturnValue = WSHShell.Run(WindowsComSpec & " /c " & strCommand, 1, True)
ReturnValue = WSHShell.Run(strCommand, 0, True)
Leaving the quotes around the realm is still required if the realm has a space in it.
Thanks for the help.