bigYobi Posted November 21, 2019 Posted November 21, 2019 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... thanks
Developers Jos Posted November 21, 2019 Developers Posted November 21, 2019 Moved to the appropriate forum, as the Developer General Discussion forum very clearly states: Quote 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. Expand 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.
rudi Posted November 22, 2019 Posted November 22, 2019 Hi. 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 download the sysinternals tool PSEXEC.EXE go to that admin CMD box as opened above exec the command.... psexec -sid cmd A new CMD box will open, that is running "AS-SYSTEM", type there ... whoami ... 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) Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE!
bigYobi Posted November 25, 2019 Author Posted November 25, 2019 Thanks Rudi for your response. it worked as you told.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now