Results 1 to 2 of 2

Thread: Not able to use the pipe character in a parameter

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    2

    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

  2. #2

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    2

    Thumbs up 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"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width