Page 1 of 1

Passing Parameters to an exposed com with vbscript

Posted: Tue Apr 18, 2017 7:55 pm
by gbradley
I'm looking for a way through scripting, send parameters to an exposed com with vbscript. The com is registered on the Switch server but not sure if there is a way to achieve this.

Is what we have thus far....

Function jobArrived(s, job)

custNum = s.getPropertyValue("custNum",job)
folderPath = job.getPath()
jsonName = s.getPropertyValue("jsonName",job)

x = Shell("E:\Switch Applications\OrderReceive\OrderReceiveSubmit\OrderReceiveSubmit.exe", folderPath, jsonName, custNum)
'objShell = CreateObject ("shell.exe")
'objShell.Run ("E:\Switch Applications\OrderReceive\OrderReceiveSubmit\OrderReceiveSubmit.exe, folderPath, jsonName, custNum")

OrderReceiveSubmit has only 3 parameters.

End Function

Re: Passing Parameters to an exposed com with vbscript

Posted: Tue Apr 25, 2017 5:14 pm
by andrea mahoney
You can try using the Execute Command element and build the arguments using text with variables.

I have been successful using javascript to execute a command as well.