Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6871585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:49:27+00:00 2026-05-27T03:49:27+00:00

In local security policy (PC-Control panel-Administration-local security policy) there is a parameter Minimum length

  • 0

In local security policy (PC-Control panel-Administration-local security policy) there is a parameter “Minimum length of the password” and a parameter “Password must meet complexity requirements” (true/false). How can I read them in Delphi (for WinXpSp3-Win2003-Vista-Win7-Win2008(+r2))?

enter image description here

I’m looking for something like:

Function DetectSystemMinPassLength:integer;
begin
//?
end;

Function DetectSystemPassComplexity:boolean;
begin
//?
end;

Additional question:
Does there exist in Delphi (or WinApi) function which can check if a given password conforms to system policies (or set)?

For example:

Function MyCheckPassComplexity (Password:string):boolean;
begin
// ???
end;

use

MyCheckPassComplexity (' 12345 '); //result False

MyCheckPassComplexity (' MyCoolPassword9999 '); //result True
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T03:49:27+00:00Added an answer on May 27, 2026 at 3:49 am

    Usually to read a local or group policy setting you must use the Group Policy Settings Reference for Windows and Windows Server which basically is a set of excel files which contains the windows registry keys where is stored such info. unfortunately in this case if you check such reference for these Account policies (Enforce password history,
    Maximum password age, Minimum password age, Minimum password length) you will find this message:

    Password Policy security settings are not registry keys.
    

    Exist a set of WMI classes in the root\RSOP\Computer namespace like RSOP_SecuritySettingBoolean, RSOP_SecuritySettingNumeric , RSOP_SecuritySettings to access the an account policy but these classes only works (I mean retrieve information) on systems which is are in a domain, but it does not work in a workgroup.

    For the moment I think which you best option is export the local policies to a ini file using this command (and then parse the result using a TIniFile class)

    secedit.exe /export /cfg C:\Output\Policy.Ini
    

    This command will create a file like this

    [Unicode]
    Unicode=yes
    [System Access]
    MinimumPasswordAge = 0
    MaximumPasswordAge = 42
    MinimumPasswordLength = 0
    PasswordComplexity = 0
    PasswordHistorySize = 0
    

    About your second question to validate a password you can use the NetValidatePasswordPolicy WinAPI function.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there a programattic way to query local security policy settings in C#, i.e.
On a servers Local Security Policy I need to give a user rights to
I'm unable to connect to the local SQL Server with connectionString="data source=.;Initial Catalog=TestDB;Integrated Security
The .NET Security Policy can be changed from a script by using CasPol.exe .
I wanted to add to my jdk6\jre\lib\security\java.policy file an interdiction to create some classes
I have a process which is running within the security context of the local
I am trying to read a value from the Local security policies using C#.
Does anyone know how I can: create IP security policy manage IP filters and
I need to create a custom security manager for a hosted WebBrowser control in
Is it possible to display local image in current document without violating the security

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.