Giter Club home page Giter Club logo

Comments (6)

wizir6 avatar wizir6 commented on July 4, 2024 1

I also faced with this issue. @Ic1k-Git , path argument has not obvious name and you should not use it as subpath from start. This argument is used to save whole path from root during recursive execution because each registry node doesn't have this information.

You could use next code to achieve your goal

for entry in reg.recurse_subkeys(nk_record=reg.root.get_key('ControlSet001\Services'), as_json=True):
    print(entry.path)

@tincho9 , what do you think about adding this information to comments or maybe to change argument name?
I have also found strange behavior with get_keys() method. From SOFTWARE registry file
reg.root.get_key('ODBC') returns valid result
reg.get_key('ODBC') returns None when reg.get_key('SOFTWARE\ODBC') still returns valid object.

from regipy.

tincho9 avatar tincho9 commented on July 4, 2024 1

I've also changed the variable named and added some documentation in the docstring.
If this works for you, i'll make a pypi release later on today.

@Ic1k-Git @wizir6
Can I close this issue?

from regipy.

tincho9 avatar tincho9 commented on July 4, 2024

I'll take a look during the next weekend. It happens with every hive?

from regipy.

Ic1k-Git avatar Ic1k-Git commented on July 4, 2024

I've tried for SOFTWARE, SECURITY and NTUSER and it happend every time.

from regipy.

tincho9 avatar tincho9 commented on July 4, 2024

Sorry about the confusion.
reg is a RegistryHive object, while reg.root is an NKRecord. The get_key function is different in each one of them.
The function in RegistryHive will resolve the path and return the key, while the get_key function in NKRecord will try to find a subkey by this name directly under the subkey. I've renamed the function in NKRecord to get_subkey.
Hope this will solve the confusion.

reg.root.get_subkey('ODBC')
reg.get_key('ODBC')
reg.get_key('SOFTWARE\ODBC')

These three now return the same result.

from regipy.

tincho9 avatar tincho9 commented on July 4, 2024

I've also changed the variable named and added some documentation in the docstring.
If this works for you, i'll make a pypi release later on today.

from regipy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.