
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.