Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
set objPWs = objFSO.OpenTextFile("passwords.txt", 2, true, 0)
strComputer = "computer_name"
set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user")
'you'll need something to count the days that pass so you can
'read the correct password.
strFirstDay = "3/31/2011"
intDays = datediff("d", strFirstDay, now)
for i = 0 to intDays
strPassword = objPWs.ReadLine
next
objUser.SetPassword strPassword
objUser.SetInfo
objPWs.close
'define, objFSO as a FileSystemObject
set objFSO = WScript.CreateObject("Scripting.FileSystemObject")
'define, objPWs as a file stream of "psswords.txt"
set objPWs = objFSO.OpenTextFile("passwords.txt", 2, true, 0)
'datepart returns the day (numerical) of the week.
'NOTE: As long as your passwords.txt file starts on Sunday and is changed weekly, your good
intDays = datepart("w", date)
'loop intDays number of times
for i = 1 to intDays
'read the line that objPWs is currently pointing to within the previously opened stream of "passwords.txt" and set it as strPassword
strPassword = objPWs.ReadLine
next
'now that we've read the correct amount of lines, use the .SetPassword method of the objUser to set the password we read from the text stream and stored in strPassword
objUser.SetPassword strPassword
'apply the changes we have made to the user.
objUser.SetInfo
'close the text stream
objPWs.close