Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Version Info using VBA and registry quirks. InterRegional Settings GmbH

  1. #21
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    This is posts https://www.excelfox.com/forum/showt...age3#post25028
    https://www.excelfox.com/forum/showt...age2#post25032



    Some extra notes to go with these main forum post
    https://eileenslounge.com/viewtopic....326446#p326446

    I am catching up here and responding to some of the interesting info in this post
    I might also be responding to the second half of this one , bit I still have not quite figured out what was being said there. ( I wasn't confused by the AidFromGuid metjhopd , - I know that's the SiP syndrone (Smartphone In Pub) :smile: )
    Or maybe I am just pondering, a not uncommon occurrence

    So… Update so far, and introduction to current stand
    Going back a year and / or 4, we have tangled with "Clsid registry lists" before, and the digressions here forced me to revise them again, from and around here , or there abouts.
    I had back then a bad Winniemidgetgismo coding, and Mike did it better, (a not un common state of affairs in recent years….)
    It ended up like this
    https://i.postimg.cc/Y9Q7rPYQ/Old-Clsid-Lists.jpg


    The coding that got the lists…
    What I tried was I Initially got just the Clsid list and then, a while later, I tried to stick them pseudo in a
    Obj = CreateObject("New:" & MeClisid & "")
    , see what happened. It did not damage or break too much on my computers, at last not all of them always, but I was not too sure what was going on. If an attempt did not error or break something, then I did a
    TypeName(Obj)
    , on the resulting object. I am not sure why I did that, I expect I just thought at the time that somebody perhaps should. I had no idea what the results were telling me.
    You ( You= Mike ) in your coding equivalent got both the Clsid list and a ProgID. (And as I understand a bit better the winygismo codings I know now where that came from). Your code never errored or broke things like mine did, and there were sometimes similarities with your ProgID results and my TypeName(Obj), for the same Clisid
    https://www.excelfox.com/forum/showt...ll=1#post25010
    https://www.excelfox.com/forum/showt...ll=1#post25012
    CLSDsUndClassNames.xls - https://app.box.com/s/nkjwti5yym9j0v634hrxerz4x7n1o90w

    But I was still none the wiser on what it all meant..


    But I am getting there now
    So lets look at your current example : https://i.postimg.cc/NMvg1Dw0/Little...ng-Runtime.jpg https://i.postimg.cc/7hD0QSSH/Micros...e-adding-a.jpg This is whre we might fist come across it, when "checking a reference for Early Binding"
    We have learnt now that the relevant word to use there is the "human readable description" or "TypeLib human readable name", aka the name to look for in the little window for checking a reference

    , - and here it is in "the Clsids" file of mine from s few years back
    https://i.postimg.cc/05f8w7X8/Clsid-...ng-Runtime.jpg ,
    {0D43FE01-F093-11CF-8940-00A0C9054228} Tried FileSystemObject {0D43FE01-F093-11CF-8940-00A0C9054228} Scripting.FileSystemObject


    Here we can see it again in the little reference checking VB Editor window, https://i.postimg.cc/NMvg1Dw0/Little...ng-Runtime.jpg , but that is perhaps not coming from directly from there, well maybe it is sort of,….


    This is something new we picked up, Here it is (a different Guid number note), in the Registry Hive HKEY_CLASSES_ROOT , at the path TypeLib\{420B2830-E718-11CF-893D-00A0C9054228}\1.0
    https://i.postimg.cc/J01MFh0V/Reg-Ty...ng-Runtime.jpg

    And we got some more recent Winnie codings to get that TypeLib info
    {420B2830-E718-11CF-893D-00A0C9054228} 1.0 Microsoft Scripting Runtime
    So that is a refresh on the Clsid stuff, and a bit extra about the TypeLib Guid
    ( This is also the Guid used in the .AddFroGuidWe do mot use the Clsid Guid there! )

    Now we will move on in the next post
    Last edited by DocAElstein; 04-06-2025 at 09:10 PM.

  2. #22
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    This is posts https://www.excelfox.com/forum/showt...ll=1#post25033
    https://www.excelfox.com/forum/showt...ll=1#post25033
    https://www.excelfox.com/forum/showt...age2#post25033
    https://www.excelfox.com/forum/showt...ll=1#post25034
    https://www.excelfox.com/forum/showt...ll=1#post25034
    https://www.excelfox.com/forum/showt...age3#post25034




    I am slightly upset at this point that the two different Guids in the last post
    _ { the Clsid Guid }
    and
    _ { the other Guid ( related to "human readable description" or "TypeLib human readable name" given in that little window which you use to check a external library reference from the VB Editor , and the one to use in the .AddFromGuid ) }
    are not more similar. Here they are again,
    {0D43FE01-F093-11CF-8940-00A0C9054228} ' Clsid Guid FileSystemObject Scripting.FileSystemObject
    {420B2830-E718-11CF-893D-00A0C9054228} ' TypeLib Guid 1.0 Microsoft Scripting Runtime

    ( But they are a bit similar. Maybe part of them would always be the same?? )

    However, all is not lost., or maybe not always. Take a look at the other info that is sometimes there for a Clsid:
    https://i.postimg.cc/HW543w1J/Micros...c-Server32.jpg
    https://i.postimg.cc/90GdMhYP/Micros...me-Prog-ID.jpg
    https://i.postimg.cc/XqMK4Jd7/Micros...e-Type-Lib.jpg
    https://i.postimg.cc/Bv6BCRJs/Micros...me-Version.jpg


    Attachment 6206Attachment 6207Attachment 6208Attachment 6209

    In particular this: https://i.postimg.cc/nc3B0jrx/Micros...e-Type-Lib.jpg

    So we can see that the info to the TypeLib ( related to "human readable description" or "TypeLib human readable name" given in that little window which you use to check a external library reference from the VB Editor, which is also the one to use in the .AddFromGuid ) is also there.


    What next, getting a bit confused with different Guids and different registry issues.

    I think at this stage, I want to extend the investigation into the Guids on the XP machine that I recently I did the extensive Guid lists on ( https://eileenslounge.com/viewtopic....326377#p326377
    https://eileenslounge.com/viewtopic....326431#p326431
    ) , just to check out the full Clsid/ Guid situation before and perhaps after the TLBINF.dll registration
    Last edited by DocAElstein; 04-09-2025 at 09:11 PM.

  3. #23
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Clsid and other Guid lists review
    We have
    _ (i) some newer "TypeLib"codings, ( including a API one!! from Mike ) which look at the Guid ( "TypeLib Guid" )related to "human readable description" or "TypeLib human readable name" given in that little window which you use to check a external library reference from the VB Editor which is also the one to use in the .AddFromGuid . The full list of these Guids is at the registry path Computer HKEY_CLASSES_ROOT TypeLib
    and
    _(ii) an older "Clsid Guid" getting set of codings from me and Mike, reviewed again recently from about here: https://www.excelfox.com/forum/showt...ll=1#post25008

    In this post I would like to update again the latter earlier Clsid Guid codings, or rather make a new single one, to include, or at least investigate, the possibility of getting the TypeLib Guid as well from it, and some other information, following the discussions of the last posts, which showed that sometimes we may have that TypeLib Guid and/ or other information "at the Clisid" list, as it were.

    This post discusses the coding. The over next posts discusses the results

    Rem 1 The first thing it does is get the full Clsid list at the registry Computer\HKEY_CLASSES_ROOT\CLSID using the Winnie way.

    There are 4972 Clsids for the XP Notebook that I have recently been using in these recent discussions ( My name for that notebook is Keks, or KeksXP or similar ). (The returned array has 4973 elements, the first one, indicia 0, has a text in it CLSID )
    This code next line puts the full CLSID list from here , https://i.postimg.cc/Tw8Th8bH/Comput...ROOT-CLSID.jpg , https://i.postimg.cc/L4DhQXL9/HKEY-C...ROOT-CLSID.jpg , into the Array Clsids(),
    RegInfoPro.EnumKey RegHive, "CLSID", Clsids()

    In each of the , ====== main loopings, each Clsid is listed in one column, and then that same Clsid is further used to get other column outputs, (if they are available, "at the Clsid") :


    Rem 3 InprocServer32 ' This seems to be the .dll or similar file
    Rem 4 ProgID - see Mike here https://eileenslounge.com/viewtopic....326247#p326247 - ProgID is [Library].[Object]
    Rem 5 Version number held "at the Clsid"
    Rem 6 TypeLib Guid if there is one held "at the Clsid"
    Rem 7 Try to make an object type with Obj = CreateObject("New:" & { The Clsid } & "") , then, if successful try to do a TypeName(LateBndObj) on that object


    ( In the previous codings from a year or 4 ago, we did just the
    ProgID from Mike
    , and the
    Try to make an object type with Obj = CreateObject("New:" & { The Clsid } & "") , then, if successful try to do a TypeName(LateBndObj) on that object from me
    The results were similar. )

    So far the coding discussed is a slightly more detailed info getting version of the previous Clsid codings.

    But there is one further important new part of this coding:
    '6b - we investigate the specific TypeLib Guid , (if there was one at the Clsid) , at the place where the full TypeLib Guid list is. We expect that the TypeLib Guid will mostly be there but we investigate if there are other more than one version, as well as comparing the actual version numbers there with that of Rem 5 Version number held "at the Clsid"
    Last edited by DocAElstein; 04-10-2025 at 01:56 AM.

  4. #24
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    9,521
    Rep Power
    10
    Coding discussed in last post.
    Results and conclusions in next posts

    Code:
    Option Explicit
    Sub BonnieBonnieBoundsOfCLSIDs()       ' https://www.excelfox.com/forum/showthread.php/2997-Testies-external-shared-Libraries-regedit-registry?p=25037&viewfull=1#post25037                         ' KeksXP()
    Rem 0
    On Error GoTo OtherError
    Dim Ws As Worksheet: Set Ws = Me
     Let Ws.Range("A1:I1") = Array("", "TypeName(Obj)", "ProgID", "Clsid", "Version at Clsid", "TypeLib Guid", "Version at TypeLib", "Human readable name", "File")
    'Me.Columns("A:I").Clear
    Dim StrCom As String: Let StrCom = "."
    Dim RegInfoPro As Object: Set RegInfoPro = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & StrCom & "\root\default:StdRegProv")
    Dim RegHive As Long: Let RegHive = -214748364.8 * 10
    Rem 1 Clsids  - for Clsid output, (but also to use for the other outputs)
    Dim Clsids() As Variant
    RegInfoPro.EnumKey RegHive, "CLSID", Clsids() '   Computer\HKEY_CLASSES_ROOT , CLSID , here comes the big array of all ya Clsids
    Dim ClsInfCnt As Long, Rw As Long: Let Rw = 1 '   This keeps track of the rows - there will likely be more than there are Clsids as we need an extra row for versions at the TypeLib place
        For ClsInfCnt = LBound(Clsids()) To UBound(Clsids())   ' The main Clsid Loop =======================
         Let Rw = Rw + 1 ' Every Clsid is on a new line
         Let Ws.Range("A" & Rw & "") = ClsInfCnt & "  " & Rw ' The first is a 0 and in the array is "CSID"  after that in the array you get the  { Guid thingy }  format    https://i.postimg.cc/mrHxggQD/Computer-HKEY-CLASSES-ROOT-CLSID.jpg
         Let Ws.Range("D" & Rw & "") = Clsids(ClsInfCnt) ' The main  { Clsid thingy }
        Rem 3 InprocServer32  '  This seems to be the  .dll  or similar file
        Dim IprcSvr32 As Variant
        RegInfoPro.getstringvalue RegHive, "CLSID\" & Clsids(ClsInfCnt) & "\InprocServer32", "", IprcSvr32
            If IsNull(IprcSvr32) Then
             Let Ws.Range("I" & Rw & "") = " -"
            Else
             Let Ws.Range("I" & Rw & "") = IprcSvr32
            End If
        Rem 4  ProgID  (- see Mike here  https://eileenslounge.com/viewtopic.php?p=326247#p326247 ) if there is one held "at the Clsid"
        Dim PrgID As Variant
        RegInfoPro.getstringvalue RegHive, "CLSID\" & Clsids(ClsInfCnt) & "\ProgID", "", PrgID
            If IsNull(IprcSvr32) Then
             Let Ws.Range("C" & Rw & "") = " -"
            Else
             Let Ws.Range("C" & Rw & "") = PrgID
            End If
        Rem 5  Version numnber if there is one held "at the Clsid"
        Dim CGVers As Variant
        RegInfoPro.getstringvalue RegHive, "CLSID\" & Clsids(ClsInfCnt) & "\Version", "", CGVers
            If IsNull(CGVers) Then
             Let Ws.Range("E" & Rw & "") = " -"
            Else
             Let Ws.Range("E" & Rw & "") = "'" & CGVers
            End If
        Rem 6 TypeLib Guid if there is one held "at the Clsid"
        Dim TypeLibGuid As Variant
        RegInfoPro.getstringvalue RegHive, "CLSID\" & Clsids(ClsInfCnt) & "\TypeLib", "", TypeLibGuid
            If IsNull(TypeLibGuid) Then
             Let Ws.Range("F" & Rw & "") = " -"
            Else ' Time to get the array of versions
             Let Ws.Range("F" & Rw & "") = TypeLibGuid '                       The Guid related to "human readable description" or "TypeLib human readable name" given in that little window which you use to check a external Library reference from the VB Editor , and the one to use in the .AddFromGuid
            Dim Vers As Variant, CntV As Long          ' Vers can be ab array or  Null
            '6b)
            RegInfoPro.EnumKey RegHive, "TypeLib\" & TypeLibGuid, Vers
                If IsNull(Vers) Then
                    Let Ws.Range("G" & Rw & "") = "Null  versions at  Computer\HKEY_CLASSES_ROOT\TypeLib"
                Else
                    For CntV = LBound(Vers) To UBound(Vers)
                         Let Ws.Range("G" & Rw & "") = "'" & Vers(CntV)
                        Dim Description As String ' Might think about having this Variant. This is the "human readable description" or "TypeLib human readable name" given in that little window which you use to check a external Library reference from the VB Editor , and the one to use in the .AddFromGuid
                        RegInfoPro.getstringvalue RegHive, "TypeLib\" & TypeLibGuid & "\" & Vers(CntV), "", Description
                         Let Ws.Range("H" & Rw & "") = Description
                        If CntV < UBound(Vers) Then Let Rw = Rw + 1 ' we need an extra line for the next version
                    Next CntV
                End If
            End If
        Rem 7 Try to make an object type  ' Do this last as it can crash and/ or set the Devil loose
        Dim LateBndObj As Object
        On Error GoTo BadObjType ' I expect the next line often to error when I try to use
         Set LateBndObj = CreateObject("New:" & Clsids(ClsInfCnt) & "")
        On Error GoTo OtherError
         Let Ws.Range("B" & Rw & "") = TypeName(LateBndObj)
    BonniBanksOfLochLomond:  '
        Next ClsInfCnt ' The main Clsid loop =============================================================
    Exit Sub
    BadObjType:
     Let Ws.Range("B" & Rw & "") = "Err '" & Err.Number & "': " & Err.Description
     Let Ws.Range("B" & Rw & "").Font.Color = 12632256
    On Error GoTo -1
    On Error GoTo OtherError
    GoTo BonniBanksOfLochLomond ' https://eileenslounge.com/viewtopic.php?p=326446#p326446
    OtherError:
    Stop
    Debug.Print "Err '" & Err.Number & "': " & Err.Description & "   " & ClsInfCnt & "  " & Rw
    Stop
    Resume Next
    End Sub
    
    Last edited by DocAElstein; 04-10-2025 at 02:09 AM.

Similar Threads

  1. ADS info via VBA 64bit
    By TML59 in forum Excel Help
    Replies: 9
    Last Post: 07-13-2024, 03:43 PM
  2. Replies: 26
    Last Post: 07-17-2013, 11:42 AM
  3. Office Version Independent Non-Activex Date Time Picker Using Form Controls
    By Excel Fox in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 07-17-2013, 12:27 AM
  4. Info: different Value !
    By PcMax in forum Excel Help
    Replies: 2
    Last Post: 04-22-2012, 04:13 PM
  5. Version 2003 to 2007
    By PcMax in forum Excel Help
    Replies: 5
    Last Post: 11-23-2011, 07:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •