Read non-key registry entries using console application

Iftikhar Haidry 1 Reputation point

I need to read registry entry entries that are not backed by key handles like "Minimum Password Length" using C#. I can see some methods to read the key based entries but can't find anything for non-key entries.

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,484 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Castorix31 82,326 Reputation points

    "Minimum Password Length" is got with NetUserModalsGet
    (usrmod0_min_passwd_len from USER_MODALS_INFO_0 structure)

    0 comments No comments

  2. Limitless Technology 39,461 Reputation points

    Hello Iftikhar,

    registry entries are properties of keys and, as such, cannot be directly browsed, we need to take a slightly different approach when working with them.

    From my knowledge, it isn't ideal to read registry entry entries that aren't by backed by key handles, it is better to go with the help of key handles

    Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall the operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

    For a further idea about your needs, do follow up the below link

    Hope this answers all your queries, if not please do repost back.
    If an Answer is helpful, please click "Accept Answer" and upvote it : )

    0 comments No comments