I am new to vbscript ... I have a script which deploys and runs a remote script using wshcontroller.
the script that is deployed amongst other things calls sqlplus on the remote server where it is running. If I copy the script onto that server and run it, it all works fine. However, when I run it remotely by deploying it from the local server, it fails. I do not get any error returned, it just stops at that point (I can tell from debugging by logging progress to a file).

The statement it fails on is as follows:-
set objshell = WScript.CreateObject ("WScript.shell")
objshell.Run "%comspec% /c sqlplus -s user/password@dev_test @d:\coldharbor\scripts\count_variable_input_pre " ,0,true

is this allowed when using the controller to call the script remotely?

I also tried the following instead:
set objshell = WScript.CreateObject ("WScript.shell")
Set objExec = objShell.Exec("cmd /c sqlplus -s username/password@dev_test @d:\coldharbor\scripts\count_variable_input_pre ")

this looks as though it has worked, and continues through the rest of the script, but has not actually worked - I can tell because the sql script being called spools a file, and that file does not exist when I have initiated it from a remote call to my vbscript script. t does if I run the same script on the actual server that it is being deployed to run on remotely though.

Also, in my deployment scrpt (code below) I have included a subroutine to handle the remote errors, but I get nothing back when an error occurs - what do I need in my deployed script (the remote copied one) to make any errors get passed back?

Also, in different examples of running these remote calling scripts the following loop sometimes has 1 as a status and other times has 2 seemingly for the same purpose. what value should theis be set to, and what does status 1 and status 2 mean?
Do While RemoteScript.Status <> 1
WScript.Sleep 1000

Finally, is there another way of doing this which allows me to pass parameters back and forth when executing the remote scrpt?

Here is the deployment script:

Dim Controller, RemoteScript, answer
answer = vbno
answer = msgbox("This Script will populate variable_input using all input files from the coldharbor\input_files interface folder - continue?",vbyesno, "ColdHarbor Interface")
if answer <> vbYes then
end if
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("coldharbor_interface_remo te.vbs", "\\psetest.sanctuary-housing.net")
WScript.ConnectObject RemoteScript, "remote_"
Do While RemoteScript.Status <> 1
WScript.Sleep 1000

WScript.DisconnectObject RemoteScript

msgbox("Coldharbor Processing finished - Please view the latest Logfile now in d:\coldharbor\logs\coldharbor_interface_log")

Sub remote_Error
Dim theError
Set theError = RemoteScript.Error
WScript.Echo "Error " & theError.Number & " - Line: " & theError.Line & ", Char: " & theError.Character & vbCrLf & "Description: " & theError.Description
WScript.Quit -1
End Sub