Page 1 of 1 1
Topic Options
#179331 - 2007-08-15 12:54 PM CreateObject 2nd Parameter for ComputerName
Arend_ Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
Like the Topic says, in VBScript the 2nd Optional Parameter could be a computername which would be very handy for remote scripting.
Top
#179336 - 2007-08-15 01:27 PM Re: CreateObject 2nd Parameter for ComputerName [Re: Arend_]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Can you provide an example of an object, and how you would use it if the functionality was present.
Top
#179347 - 2007-08-15 03:31 PM Re: CreateObject 2nd Parameter for ComputerName [Re: Richard H.]
Arend_ Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
 Originally Posted By: Richard H.
Can you provide an example of an object, and how you would use it if the functionality was present.

Sure, this would be intended to retrieve the URL's the user on "PC-2" is currently viewing.
 Code:
Dim $shellApp, $ieWindow, $sLocationName, $sURL
$shellApp = CreateObject("Shell.Application","PC-2")
$ieWindow = CreateObject("InternetExplorer.Application","PC-2")
For Each $ieWindow In $shellApp.windows
  $sLocationName = $ieWindow.LocationName
  $sURL = $ieWindow.LocationURL
    If $sLocationName <> ""
        If $sURL <> ""
          ? $sURL + @CRLF
        EndIf
    EndIf
Next
$ieWindow = ""
$shellApp = ""

Top
#180250 - 2007-09-07 06:27 PM Re: CreateObject 2nd Parameter for ComputerName [Re: Richard H.]
Arend_ Offline
MM club member
*****

Registered: 2005-01-17
Posts: 1896
Loc: Hilversum, The Netherlands
This will help explain my suggestion a bit more \:\)
2006 November Scripting Puzzle

Top
Page 1 of 1 1


Moderator:  Lonkero, ShaneEP, Jochen, Radimus, Glenn Barnas, Allen, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1739 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.058 seconds in which 0.031 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org