Jump to content

How to set Password hint in Autoit using cmd - (Moved)


Recommended Posts

i am trying to set a password hint for a user account using command prompt or powershell in Autoit. The only thing that i have tried, is to copy the registry key where password hint is written. The problem is that i need permission from the SAM Key.
here is what i wrote: Regwrite("HKLM\SAM\SAM\Domain\Account\Users\000003F5", "UserPasswordHint", "REG_SZ", "Admin")

i hope you will help me...


Link to comment
Share on other sites

  • Developers

Moved to the appropriate forum, as the Developer General Discussion forum very clearly states:


General development and scripting discussions. If it's super geeky and you don't know where to put it - it's probably here.

Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums.

Moderation Team

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to comment
Share on other sites


HKLM\SAM\SAM is a highly protected area in the registry.

Even with #requireadmin in your autoit script you will not be able to access this part of the registry without manipulating the rights before. As the restrictive rights settings are essential for security reasons it's really no good idea to do so (Basically: To mess up Windows' security concept!)


You can check this by running a CMD box with "Run as Administrator" and placing there this command:

reg query hklm\sam\sam\domains\account\users


You will need to operate as "SYSTEM" to get access without messing up the rights for this part of the registry


  1. download the sysinternals tool PSEXEC.EXE
  2. go to that admin CMD box as opened above
  3. exec the command....
psexec -sid cmd


A new CMD box will open, that is running "AS-SYSTEM", type there ...


... to notice that.

In this CMD box running "AS-SYSTEM" the reg query command will work nicely. (Same is fact for writing to the registry)



Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...