Using WSH for Remote Automation 
Author Message
 Using WSH for Remote Automation

Looking through the book "Windows Script Host -- Programmer's
Reference" (Wrox) there is a brief mention of Remote Automation.
According to the book, the VBScript 5.0 CreateObject() function now
takes an additional parameter that is interpreted as the name of the
remote machine on which to create the object. So, it should be
possible to run a VB script such as:
Set remExec = WScript.CreateObject ("WScript.Shell" , "\\MyMachine")
remExec.Run "net start MyService" 'Runs MyService on MyMachine
In practice, I can't get this to run on remote machines. Has anyone
had experience with Remote Automation on WSH?

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sat, 14 Sep 2002 03:00:00 GMT  
 Using WSH for Remote Automation
Wrong CreateObject...  VBScript has its own CreateObject() whose 2nd argument means something
different than the WScript.CreateObject().  The DCOM support started working in version 5.1.

Set remExec = CreateObject ("WScript.Shell" , "\\MyMachine")

Whether this will work with WScript.Shell is questionable...

Has anybody out there actully done this? (the wscript.shell part, I know the remote server part
works ;-)...

--
Michael Harris
MVP Scripting

Looking through the book "Windows Script Host -- Programmer's
Reference" (Wrox) there is a brief mention of Remote Automation.
According to the book, the VBScript 5.0 CreateObject() function now
takes an additional parameter that is interpreted as the name of the
remote machine on which to create the object. So, it should be
possible to run a VB script such as:
Set remExec = WScript.CreateObject ("WScript.Shell" , "\\MyMachine")
remExec.Run "net start MyService" 'Runs MyService on MyMachine
In practice, I can't get this to run on remote machines. Has anyone
had experience with Remote Automation on WSH?

Sent via Deja.com http://www.deja.com/
Before you buy.



Sat, 14 Sep 2002 03:00:00 GMT  
 Using WSH for Remote Automation
Posted here a similar question a few weeks ago without
any feedback. My experience was that the feature works
in prinziple, but I wasn't able to produce reasonable results.
For instance I tried to invoke Internet Explorer on a remote
machine. I notized in Taskmanager that the process runs,
but I wasn't able to set the visible attribute to show a window.

Because I tried all thouse stuff on Win 2000, I switched over
to WMI, which allows me to do this and other things painless.

G. Born

Check out the WSH Bazaar at:

www.borncity.de

Michael Harris schrieb in Nachricht ...

Quote:
>Wrong CreateObject...  VBScript has its own CreateObject() whose 2nd

argument means something
Quote:
>different than the WScript.CreateObject().  The DCOM support started

working in version 5.1.
Quote:

>Set remExec = CreateObject ("WScript.Shell" , "\\MyMachine")

>Whether this will work with WScript.Shell is questionable...

>Has anybody out there actully done this? (the wscript.shell part, I know

the remote server part
Quote:
>works ;-)...

>--
>Michael Harris
>MVP Scripting


>Looking through the book "Windows Script Host -- Programmer's
>Reference" (Wrox) there is a brief mention of Remote Automation.
>According to the book, the VBScript 5.0 CreateObject() function now
>takes an additional parameter that is interpreted as the name of the
>remote machine on which to create the object. So, it should be
>possible to run a VB script such as:
>Set remExec = WScript.CreateObject ("WScript.Shell" , "\\MyMachine")
>remExec.Run "net start MyService" 'Runs MyService on MyMachine
>In practice, I can't get this to run on remote machines. Has anyone
>had experience with Remote Automation on WSH?

>Sent via Deja.com http://www.deja.com/
>Before you buy.



Sun, 15 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Win2K Setup Automation using WSH

2. WSH - Outlook Express Automation, IE Automation

3. sending email using CDO and remote WSH

4. Remote Install using WSH

5. Scheduling programs on remote computers using wsh

6. Problems using remote capabilities of WSH 5.6

7. Remote shutdown using wsh

8. passsing argument to a remote script - with remote WSH

9. remote Authentication for running a remote wsh script

10. cannot create remote automation object

11. Connecting to a remote Automation server

12. Remote Automation of NT Dialer?

 

 
Powered by phpBB® Forum Software