WScript.GetObject

Retrieve an Automation object (assumes there is a current instance of the object)

Syntax 
      Set objObject = Wscript.GetObject(strPathname [,strProgID] ], [strPrefix])

Arguments:

   strPathname : The pathname of the file containing the object to retrieve. 
                 (required)

   strProgID   : The program identifier (ProgID) of the object. 

   strPrefix   : A prefix for subroutine names (optional)
                 e.g. if strPrefix is "MYOBJ_" and the object fires an event
                 named "OnBegin," WSH calls the subroutine "MYOBJ_OnBegin" 


objObject is an Automation object. 

Related commands:

Object, create - Wscript.CreateObject

Equivalent Windows NT command:



Back to the Top

Simon Sheppard
SS64.com