Not able to use the pipe character in a parameter
I am having issues when using the pipe character in VBscript, but works with other characters. For example I call a batch file from the vbscript as shown below
Set objXML = CreateObject("Microsoft.XMLDom")
objXML.loadXML("<document/>")
Set xmlNode = objXML.documentElement.AppendChild(objXMl.createElement("batchprocess"))
xmlNode.setAttribute "file", "D:\Documents\Batch\Test.bat "TEST|PASS|1"
xmlNode.setAttribute "queued", "true"
the parameter I am passing is TEST|PASS|1, and because of the "|" character it is not working. If I use TEST_PASS_1 it works fine. Is there a way I can work around to use the pipe character?
Thanks
Re: Not able to use the pipe character in a parameter
I was able to work around the issue by using the ASCII character char(124)
for example
"TEST|PASS|1"
"TEST" & char(124) & "PASS" & char(124) & "1"