Esselbach Contentteller CMS

  • Programs
  • Games
  • Articles
    • Virus, Malware & Rootkit Cleanup Links
  • News
  • Links
  • About
  • Support Forums
Site Search
Loading

Programs
· Tweaking.com Programs
· Site Info
· Games

Advertisement

Top Programs collapse/expand
· Tweaking.com - Windows Repair Free/Pro
· Simple System Tweaker
· Advanced System Tweaker
· Registry Backup
· Tweak Search
· Repair Windows Firewall
· Repair .lnk (Shortcuts) File Association
· Repair MSI (Windows Installer)
· Reset Registry Permissions
· Repair Internet Explorer

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

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


-Advertisement-
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
© 2019 Tweaking.com
Powered by Contentteller® Business Edition