Execute batch or vbscripts scripts remotely

11 views
Skip to first unread message

John

unread,
Aug 15, 2005, 1:18:09 PM8/15/05
to

I would like to know how I can have one of my scripts that resides on
serverA call another script that resides on serverB across the network and
pass it the variables that serverA’s script collected to serverB script to
complete the workflow process

The scripts can be Windows shell scripts .cmd or .bat or they can also be
VBScript

Thank you,

John

Michael Harris (MVP)

unread,
Aug 15, 2005, 8:55:55 PM8/15/05
to


See the WSH documentation for the WshController/WshRemote objects.

You can also use 3rd party tools like psexec (free) from
www.sysinternals.com.

--
Michael Harris
Microsoft MVP Scripting


John

unread,
Aug 15, 2005, 10:17:02 PM8/15/05
to
Michael Harris
thank you very much for your input.

I will put something together with WSHcontroller and formulate a basic
working protocol of what I want and hopefully run with this.

I will also test psexec.

Do you know of hand any limitations that psexec has like the
wshcontroller\createscript that doesnt execute .exe or .bat?

Thank you,

Juan

Michael Harris (MVP)

unread,
Aug 15, 2005, 11:55:09 PM8/15/05
to
John wrote:
> Michael Harris
> thank you very much for your input.
>
> I will put something together with WSHcontroller and formulate a basic
> working protocol of what I want and hopefully run with this.
>
> I will also test psexec.
>
> Do you know of hand any limitations that psexec has like the
> wshcontroller\createscript that doesnt execute .exe or .bat?


None that I know of, but I'm not exactly a psexec power user, or even
WshRemote for that matter, except to experiment to understand how it
works...

eli

unread,
Aug 17, 2005, 9:14:58 AM8/17/05
to
Not a power user, either.
psexec is a cool tool.
It authenticates to the local system account, and runs in that context.  But then, I am not in the context of a Microsoft domain.
Otherwise, I use the ps* tools quite a bit.
Any comments on this would be appreciated.
Eli

>>> Michael Harris (MVP)<mikhar at mvps dot org> 2005.08.15 22:55:09 >>>

ESP

unread,
Nov 3, 2005, 6:12:02 PM11/3/05
to
Nope :-)
Through trial/error, you change the default launching app to whatever you
need, and include that in the call to psexec.exe.

Example for .bat from inside of VBS:
WshShell.Run "psexec cmd /c Start MyBatch.bat"

ESP

Cheravuth

unread,
Feb 26, 2010, 6:35:01 AM2/26/10
to
HI,

Making sure the batch run successfully with no error. How can we get return
code from the batch file? Any advise

Thanks

Reply all
Reply to author
Forward
0 new messages