Click here to return to the KiXtart HelpDesk main page...

KiXtart Script Depot

Disable Password Caching for Win95

; Author: Pablo David Martinez
; Email: pmartinez@boartlongyear.com.au
; Date created: 28/09/1998
; Description: With Windows 95 you have a Windows password as well as the
; network password. The Windows password is cached which is annoying
; for the user(s) when it is time for the user(s) to change their network password.
; In order to disable the Windows cached password, the script file
; adds "Keys" & "Values" in the user(s) registry.
; So when it is time for the user(s) to change their password, they only have to worry about the Network Password.		
;

ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\NETWORK")
If @ERROR = 0
   GOTO NOPWD
ELSE
   GOTO CONT
endif

:CONT
ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES")
If @ERROR = 0
   GOTO NETWORK
ELSE
   ADDKEY("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES")
ENDIF

:NETWORK
ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\NETWORK")
If @ERROR = 0
   GOTO NOPWD
ELSE
   ADDKEY("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\NETWORK")
ENDIF
GOTO NOPWD

:NOPWD
? "Adding no password cache"
ExistKey("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\NETWORK")
If @ERROR = 0
;  ? "Updating No password cache"
   WriteValue("HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\POLICIES\NETWORK",  "DisablePwdCaching","1","REG_SZ")
ELSE
endif

:END