Avatar of BFanguy
BFanguy
Flag for United States of America asked on

need to know how to pass variable with a semicolon within the value from vbscript to vbs

Trying to pass variables from our ERP software.
these are the values:
ORDER_ID = "TEST"
CONTACT_EMAIL = "BBunny@testthis.com; EFudd@testthis.com"
DATABASE = "TESTDB"

This is the code I am trying:
dim shell
set shell = createobject("WSCRIPT.SHELL")
shell.Run """\\CT01\Root\Visual\Scripts\VMPURENT_Email_800.vbs"" """ & "" & """ " & ORDER_ID & " " & CONTACT_EMAIL & " " & DATABASE & " " & USER & " " & fname & " " & "0",,false

Open in new window


\\CT01\Root\Visual\Scripts\VMPURENT_Email_800.vbs
Dim args
Dim Shell
set args = Wscript.Arguments
if args.count = 0 then wscript.quit
MSGBOX "0 Position: " & args(0) & "  1 ID: " & args(1) & "  2 Email: " & args(2) & "  3 Database: " & args(3) & "  4 User: " & args(4) & " 5 first name: " & args(5) & " 6 downs: " & args(6)

Open in new window


agrs(1) contains TEST
agrs(2) contains BBunny@testthis.com
args(3) contains EFudd@testthis.com
args(4) contains TESTDB

args(2) should contain BBunny@testthis.com; EFudd@testthis.com
args(3) should contain TESTDB

what do I need to do to pass a variable that contains a semicolon to another vbs program using shell
VB Script

Avatar of undefined
Last Comment
BFanguy

8/22/2022 - Mon
SOLUTION
Martin Liss

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
BFanguy

ASKER
don't have their code, but i can modify what they pass me like you suggest before sending it off.
will try.
ASKER CERTIFIED SOLUTION
David Naulls

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
BFanguy

ASKER
three quotes did it. thank you david.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck