sharptonm
Enthusiast
Enthusiast

Guest Agent Pass Variable with spaces

I am hoping someone can confirm what I am suspecting.  It appears you cannot pass a variable with spaces in it to Guest agent to run a batch.

I have a build profile in vCAC 6.1.1, in which the variable has a space in it.  The space is lost when the script runs even when quoted.  Variablewithspaces = thiswillbreak after spaces

c:\somescripttoechotoafile.cmd "{Variablewithspaces}"


I am simply echoing into a file to see what happens, thiswillbreak is all that is written to the test file.  Anyone ran into this before?

Sharpton

1 Reply
eoinbyrne
Expert
Expert

Not tried this but have you tried escaping the spaces?

e.g,

"thiswillbreak\ after\ spaces"

Since the vRA appliance is built on Java & Linux tech this might work....