Issues with using Create Until statement - contains '{'

(imported topic written by taadams91)

Hi,

I am using create until statement to create vbs scripts inline.

The action which does this is failing on the data contained in the create until command at this line.

'Set objWMIService = GetObject(“winmgmts:{impersonationLevel=impersonate}!\.\root\cimv2”)

Do I have to double up the ‘{’ character even though this is data like a “here file” in unix? Do I have to escape the character in some manner? If so how do I do this?

(imported comment written by SystemAdmin)

I think you want to use %7B for a “{” and %7D for a “}”.

-Paul

(imported comment written by BenKus)

Yes… Paul’s way should work, but you can also escape the “{” with another “{”:

'Set objWMIService = GetObject(“winmgmts:{{impersonationLevel=impersonate}!\.\root\cimv2”)

Ben