Results 1 to 10 of 24

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Fuhrer, Vierte Reich DocAElstein's Avatar
    Join Date
    Aug 2014
    Posts
    10,457
    Rep Power
    10
    From Mike > that list is perhaps derived from a registry list ,
    HKEY_CLASSES_ROOT\TypeLib

    OK, Let's take a look….
    There is a bit of an awkward thing with sub Folders with different numbers on. Here is the first few
    https://i.postimg.cc/k4Jm9RQ6/Type-L...-0-Library.jpg
    Type-Lib-Microsoft-Active-X-Data-Objects-2-0-Library.jpg
    Probably those numbers are in the range 1.0 to 6.0 or there abouts. Never mind, I am sure my high levels of VBA skillture will get me over that little hurdle ….. here we go then …. Hold ya butts ….

    [EDIT This coding is a pile or Wank ,
    ( You may want to revisit your code, as it seems to be dropping some names. )
    , hopefully these pages will do better
    https://www.excelfox.com/forum/showt...registry/page2
    https://www.excelfox.com/forum/showt...ngs-GmbH/page3


    Code:
    Public Sub ListQuid()  '     https://eileenslounge.com/viewtopic.php?p=326180#p326180                  ' https://powershell.one/wmi/root/cimv2/stdregprov-EnumKey    '   https://www.vbforums.com/showthread.php?552899-Getting-all-sub-keys-from-a-registry-value                  https://www.vba-tutorial.de/apireferenz/registry.htm
    Dim Ws As Worksheet: Set Ws = ThisWorkbook.Worksheets("CLSIDsOldVista4810TZG")                    ' set ws = Set Ws = Me ' Set Ws = ActiveSheet
    Dim RegObject As Object, MeQuids() As Variant, QuidsNmbrValue As Variant
     Set RegObject = GetObject("winmgmts:\\.\root\default:StdRegProv")
     RegObject.EnumKey 2147483648#, "TypeLib", MeQuids()                                                                                                    ' https://powershell.one/wmi/root/cimv2/stdregprov-EnumKey
    Dim Cnt As Long, ExRowCnt As Long: Let ExRowCnt = 1 ' ==============================================
        For Cnt = LBound(MeQuids()) To UBound(MeQuids())
         Let Ws.Range("K" & ExRowCnt + 1 + 1 & "") = MeQuids(Cnt)
        ' RegObject.getstringvalue 2147483648#, "TypeLib\" & MeQuids(Cnt) & "\2.0", "", QuidsNmbrValue ' as example this is the first one,    https://i.postimg.cc/k4Jm9RQ6/Type-Lib-Microsoft-Active-X-Data-Objects-2-0-Library.jpg
        ' This extra loop stuff could probably be done better ' ----------------------------------------
        Dim strQuidNmbr As String, QuidNmbr As Single
            For QuidNmbr = 1 To 6 Step 0.1
             Let strQuidNmbr = Format(QuidNmbr, "0.0")
            RegObject.getstringvalue 2147483648#, "TypeLib\" & MeQuids(Cnt) & "\" & strQuidNmbr & "", "", QuidsNmbrValue
                If IsNull(QuidsNmbrValue) Then
                
                Else
                 Let Ws.Range("L" & ExRowCnt + 1 + 1 & "") = QuidsNmbrValue
                 Let ExRowCnt = ExRowCnt + 1
                End If
            Next QuidNmbr ' ----------------------------------------------------------------------------
            If Ws.Range("K" & ExRowCnt + 1 + 1 & "").Value <> "" Then Let ExRowCnt = ExRowCnt + 1 ' This will make sure we also go down a lins for any  Quid  with no name
        Next Cnt         ' =============================================================================
    End Sub
    Sub SortIt() ' This will help to get a similar order to that seen in the VB Editor referrence list
    Dim Ws As Worksheet: Set Ws = ThisWorkbook.Worksheets("CLSIDsOldVista4810TZG")
     Ws.Range("M3:N666") = Ws.Range("K3:L666").Value
     Ws.Range("M3:N666").Sort Key1:=Ws.Range("N3:N666"), Order1:=xlAscending
    End Sub
    
    
    
    
    
    
    
    
    
    
    '    https://eileenslounge.com/viewtopic.php?p=326198#p326198        https://eileenslounge.com/viewtopic.php?p=326198&sid=6f3fd375f6153093b306e77e56d88af9#p326198
    
    
    
    '    HKEY_CLASSES_ROOT (2147483648#) (&H80000000)
    '    HKEY_CURRENT_USER (2147483649#)
    '    HKEY_LOCAL_MACHINE (2147483650#)
    '    HKEY_USERS (2147483651#)
    '    HKEY_CURRENT_CONFIG (2147483653#)
    EDIT This coding is a pile or Wank ,
    ( You may want to revisit your code, as it seems to be dropping some names. )
    , hopefully these pages will do better
    https://www.excelfox.com/forum/showt...registry/page2
    https://www.excelfox.com/forum/showt...ngs-GmbH/page3





    Re arranged in alphabetical order in column N of uploaded file, and compared, - there is very close agreement:
    https://i.postimg.cc/28kgC7XD/Good-C...eferrencee.jpg Good Correlation Quid from HKEY_CLASSES_ROOT TypeLib to referrencee.JPG
    Attached Files Attached Files
    Last edited by DocAElstein; 04-02-2025 at 10:15 PM.

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
  •