Hello good people of Stack Overflow,
I am having a hard time trying to figure out a way to do this (or even if it is possible). I am trying to programmatically set (not just read, which I can do just fine) Local Security settings on Windows 7. I don't know if I'm referring to those correctly, but basically I want to change things under "Computer Configuration\\Windows Settings\\Security Settings\\Account Policies."
Things I have tried/researched:
Any thoughts (or better yet, examples?) This is driving me crazy--there seem to be 30,000 different possible ways to do this, but none of them are particularly helpfully documented and I feel like I'm drowning in alphabet soup.
Thanks!
Most of the settings under "Account Policies" can be configured using NetUserModalsSet
with either USER_MODALS_INFO_0
(password policy) or USER_MODALS_INFO_3
(account lockout policy).
However, I couldn't find any way to configure "Password must meet complexity requirements" or "Store passwords using reversible encryption".
我一直在做的方式是使用secedit.exe,它是system32的一部分,您可以执行
Secedit.exe /export /cfg c:\cfg.txt
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.