Jump to content

Creating COM Object knowing Class ID


sarbasov
 Share

Recommended Posts

Hi, guys! Could you please help me? My goal is to set up Internet Explorer Security Settings, such as security zones and their security levels. For that I need to use object Security Manager with CLSID = {7b8a2d94-0ac9-11d1-896c-00c04Fb6bfc4}. The problem is that ObjCreate function does not accept CLSIDs, only ProgID's as argument. But my required class does not have a ProgID. How can I create this object in AutoIt? There are a lot of solutions for .NET or VBS in Internet, but nothing for AutoIt.

Dim $obj = ObjCreate("{7b8a2d94-0ac9-11d1-896c-00c04Fb6bfc4}") does not work. Thank you for any help!

Link to comment
Share on other sites

Find a good VBS example. Those are very easily translated into AutoIt.

Sorry, there is no VBS example also anywhere.

There is C# example, that is hard to translate into AutoIt:

Type t = Type.GetTypeFromCLSID(new Guid("7b8a2d94-0ac9-11d1-896c-00c04fb6bfc4"));
IInternetSecurityManager ism = (IInternetSecurityManager)Activator.CreateInstance(t);
Link to comment
Share on other sites

Sorry, there is no VBS example also anywhere.

There is C# example, that is hard to translate into AutoIt:

Type t = Type.GetTypeFromCLSID(new Guid("7b8a2d94-0ac9-11d1-896c-00c04fb6bfc4"));
IInternetSecurityManager ism = (IInternetSecurityManager)Activator.CreateInstance(t);
Shouldn't that discoverable from a registry search for the GUID string as a key name?

:D

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...