Hi Steve,

    Try this list and the other posting has a link, when it gets posted, or I 
will provide the link.
        Bruce

GetObject( )
 may very well be the ultimate function of VBScript and JScript, but the 
Microsoft
documentation for the function is so weak that no matter how perceptive you are,
you could never guess that it was capable of so much.
GetObject( )
 is the magic function. It can open almost anything and create an object 
reference
from it. Here's a short list of what you can do with
GetObject( ):
use a Java Class that has NOT been registered on the server
Access and change keys in the IIS Metabase
Access and change Windows settings
use a Windows Scripting Component that has NOT been registered on the server
use a component based on it's CLSID
queue a component
and on and on...
How can one function be that versatile (and that list above is just a little 
taste
of GetObject( )
's power) and more importantly, how can you specify to
GetObject( ) what to do with the object you are referencing?
It's all in the way that the argument of GetObject( ) is specified. Here's a 
detailed
look at the GetObject( )
 function:
GetObject([pathname] [, class])
There are two arguments, both of them are optional. Most of the time, you will 
only
use one argument for
GetObject( )
 and your argument will contain a moniker at it's beginning. Before I lose you 
on
that wierd word moniker, all a moniker is, is a name that represents an object 
and
may include the complete path or address that identifies the location of the 
object.
So a moniker for the
GetObject( )
 function is usually a one word descriptor representing the type of object being
called so that the Scripting Engine can use the proper method to retrieve a 
working
copy of the object that you can use in ASP to perform actions.
These monikers are what allows the GetObject( ) function to be so versatile. Now
we need a list of monikers that
GetObject( )
 supports... This can be a daunting task because the documentation on this stuff
is scarse and displaced everywhere and there's nothing stopping you from 
defining
custom monikers that
GetObject( )
 can use. Here's the ones that I'm familiar with and that
GetObject( )
 should support on most Windows 2000 and NT machines.
GetObject( ) argument
(including moniker in bold)
what it does
"iis:<metabasepath>"
Allows a programmer to view and alter key IIS functionality for any webserver 
physically
connected to this machine.
"java:<classname>"
Returns a reference to an unregistered java object found in the %system root
%\java\trustlib
 folder using the Java Virtual Machine.
"script:<absolutepath>"
Returns a reference to an unregistered Windows Scripting Component or other 
supported
script type.
"clsid:<clsid>"
Returns a reference to an object by it's class ID in the registry.
"WinMgmts:<string>"
Allows access to base Windows OS functionality with WMI
"OBJREF:<base64encodedstring>"
Returns access to a running object instance
"queue:<clsid/progid>"
Used to activate a queued COM+ component via MSMQ.
"new:<clsid/progid>"
Allows instancing of any COM component supporting the IClassFactory
 pointer (including queued components)
Sent: Tuesday, October 07, 2014 8:23 AM
Subject: Re: GetObject syntax / function


Jonathan,

GetObject is a native VBScript function. I'm curious, can you get access to the 
object from a stand-alone script, e.g. one which isn't hosted by Window-Eyes?

Steve


 --
Stephen Clower
Window-Eyes Product Support and App Development
 Ai Squared
725 Airport North Office Park
Fort Wayne, IN 46825
(802) 362-3612
www.aisquared.com<http://www.aisquared.com>
Sent from my phone.


On Oct 7, 2014, at 7:27 AM, "Jonathan C. Cohn" 
<jon.c.c...@gmail.com<mailto:jon.c.c...@gmail.com>> wrote:

I am having issues reproducing a GetObject() command I am using in a JAWS 
script to work in WindowEyes. In JAWS  GetObject(R”eflection.Session”). Note 
that in JAWS this takes just one argument. After invoking this command I can 
act directly with the scriptable objects of the current session. In VBS with 
WindowEyes the GetObject requires two parameters, where the second parameter 
appears to be equivalent to the parameter that JAWS uses.

If I use a null string for the first parameter then Reflection creates a new 
hidden window. If I use the path of the Reflections settings file then I get a 
new session to the host. If I leave the first parameter completely blank, I get 
back an ActiveX error.  What am I missing here?

Thanks in advance for any hints.Best wishes,

Jonathan





---
This email is free from viruses and malware because avast! Antivirus protection 
is active.
http://www.avast.com

Reply via email to