Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

SRP_Registry

edited March 2022 in SRP Utilities
Firs time using.
Cant get a result, get error returned.

Trying to use in HTTP_FRAMEWORKS as the GetHTTPRegistrySettings service does not keep all subkeys

List = SRP_Registry("LISTKEYS", 'HKEY_LOCAL_MACHINE\SOFTWARE\Revsoft\OECGI4', "", 1, Error) error=Failed to open key

this is what I really want to work:
Service ='READ' ; ValueName='pbcdatapath' Result = SRP_Registry(Service, RegistryKey, ValueName, DataLoc, Error)

Highlited is the one I want to eventually get.

Comments

  • Does the EXISTS service find it?

    Key = "HKEY_LOCAL_MACHINE\SOFTWARE\Revsoft\OECGI4"
    Exists = SRP_Registry("EXISTS", Key, ValueName, Value, Error)
  • Nope
    exists=0
  • Well it is not an issue with the registry entry.

    Key = "HKEY_LOCAL_MACHINE\SOFTWARE\paint.net"
    Exists = SRP_Registry("EXISTS", Key)

    exists=0
  • I realise this question doesn't make much sense on the surface but have you tried using the abbreviations instead of the full name for the hive?

    "HKLM" instead of "HKEY_LOCAL_MACHINE"
  • Disregard that suggestion. I just tested it myself and it worked both ways
  • @BarryStevens if you click here on the ribbon you'll get to the About page.


    In the table, there's references to the ribbon and controls versions.


    Do you see anything there? If so, then srp_registry is working for you.
    Check "LoadVersionTable" in pbc_about_events for examples.
  • I've tried various combinations, and I can't reproduce this issue. I tried it running both in Administrative Mode and without, and I can query and read without issue. I tested in 2.2.5, though that really shouldn't matter since SRP_Registry has changed since 1.1.3.
  • @AusMarkB
    Yes, I get that result

    In my code I put

    Service = 'READ' Key = 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion' ClsID = '' ValueName = 'ProductName' WindowsVersion = '' Success = SRP_Registry(Service, Key, ValueName, WindowsVersion, Error)

    And got a value returned in WindowsVersion and Success=1

    Tried this

    Service = 'READ' Key = 'HKLM\SOFTWARE\Revsoft\OECGI4\ApiPBC' ValueName = 'ProcedureName' WindowsVersion = '' Success = SRP_Registry(Service, Key, ValueName, WindowsVersion, Error)

    And got "" returned in WindowsVersion and Success=0 and error='Failed to open key'


  • In RegEdit, right click all folders in the path and check to see that you have permissions to read.
  • Only CREATOR ONLY doesnt and I tick read and apply but it doesnt take.
    CREATOR ONLY doesnt have a read on 'Revelation Universal Driver' but I can 'read' that one.
  • edited March 2022
    When I replicate the same path



    Service = 'READ' * Key = 'HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion' Key = 'HKLM\SOFTWARE\Revsoft\OECGI4\ApiPBC' ClsID = Null$ * ValueName = 'ProductName' ValueName = 'ProcedureName' WindowsVersion = '' Success = SRP_Registry(Service, Key, ValueName, WindowsVersion, Error)
    I get the same results, null, false, failed to open error
  • Okay, I know what this is. This is indeed a 32-bit issue. 32-bit applications, when running on 64-bit systems, cannot access keys directly under the SOFTWARE key. Any attempt to do so is redirected to SOFTWARE\WOW6432Node. In this case, when you try to read 'HKLM\SOFTWARE\Revsoft\OECGI4\ApiPBC', you are actually reading 'HKLM\SOFTWARE\WOW6432Node\Revsoft\OECGI4\ApiPBC'.

    If you ran this same code in OI 10, then reading 'HKLM\SOFTWARE\Revsoft\OECGI4\ApiPBC' would actually read 'HKLM\SOFTWARE\Revsoft\OECGI4\ApiPBC'.
  • edited March 2022
    But I am running HTTP_FRAMEWORKS in OI9 using OECGI4.
    so how does http_frameworks do it. as it has registry values saved away, albiet only selective ones
    that information request has been made here
  • The HTTP Framework gets the registry values you are referencing from the OECGI payload. It doesn't have to query the registry. (Once upon a time it did do that, but that was problematic because we made assumptions about the path to the correct OECGI registry.)
Sign In or Register to comment.