Esselbach Contentteller CMS

  • Programs
  • Changelog
  • About
  • Support Forums
  • Frequently Asked Questions (FAQ)
Site Search
>

Advertisement Try DriverFix

Free Apps collapse/expand
· Tweaking.com - Windows Repair Free/Pro
· Tweaking.Com - The Home Of Windows Repair
· Simple System Tweaker
· Registry Backup
· Advanced System Tweaker
· Tweak Search
· Tweaking.com - Hardware Identify
· Repair MSI (Windows Installer)
· Repair Windows Firewall
· Repair .lnk (Shortcuts) File Association

Programs
· Tweaking.com Programs
· Site Info
· Games
· Legacy Apps

Articles
· Tips and Tweaks
· Virus, Malware & Rootkit Cleanup Links

Top Articles collapse/expand
· Tweaking.com - Windows Repair - Change Log
· Virus, Malware & Rootkit Cleanup Links
· Tweaking.com - Windows Repair - Buy Pro
· Tweaking.com - Windows Repair (All In One) Tips
· Tweaking.com - Technicians Toolbox - Buy Pro
· Performing a Proper Windows Clean Boot on XP, Vista, 7, 8 and 8.1
· Increase Network Performance
· Remove Windows Nag Icon To Upgrade To Windows 10
· Tweaking.com - Registry Backup Online Help & FAQ
· IP/DNS Tweak

Try DriverFix
Tweaking.com » Articles » How To Keep Vista, 7 & XP's Password From Expiring » Page 1

How To Keep Vista, 7 & XP's Password From Expiring



By default, in Vista, 7 and sometimes in XP, you must reset your password every so often. Well, a lot of times this isn't needed and some people just get annoyed by it. Luckily, turning this off is VERY simple. However, you could also use the VBS script I wrote to automatically disable this feature.

This is a perfect tool for an admin, computer tech, or any common user. Sometimes just clicking a file and being done is better than doing it manually.

The VBS code is very simple and already available for you in the zip file.

This script references the currently logged on user to detect the names of both the current user and computer and then does the work for you.

Code-----------------------------------------------------------------------

Const ADS_UF_DONT_EXPIRE_PASSWD = &H10000

Dim user
Dim username
Dim computername
Dim lngFlag

Set WshNetwork = WScript.CreateObject("WScript.Network")

computername = WshNetwork.ComputerName
username = WshNetwork.UserName

Set user = GetObject("WinNT://" & computername & "/" & username & ",user")

lngFlag = user.Get("userflags")

If (lngFlag And ADS_UF_DONT_EXPIRE_PASSWD) = 0 Then

lngFlag = lngFlag Xor ADS_UF_DONT_EXPIRE_PASSWD
user.Put "userflags", lngFlag
user.SetInfo

msgbox username & " on " & computername & " Password now set to not expire."

else

msgbox username & " on " & computername & " Password already set to not expire."

End If

Code-----------------------------------------------------------------------



Now if you wish to do it manually that is very simple to.

Start with right clicking on "My Computer" or "Computer" and on that menu left click on “Manage”. From here, on the left, you go to "Local Users and Groups" then “Users”. Open your user(s) and finish by setting the field and click apply. All done!



Easy as pie, once you learn it.

Tweaking.com » Articles » How To Keep Vista, 7 & XP's Password From Expiring » Page 1
© 2022 Tweaking.com
Powered by Contentteller® Business Edition