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.
Const ADS_UF_ACCOUNTDISABLE = &H0002
strComputername="testbox.company.com"
' Bind to the user object with the WinNT provider.
Set objUser = GetObject("WinNT://" & strComputername & "/baduser,user")
' Retrieve userFlags attribute of user.
lngFlags = objUser.userFlags
' Set password never expires.
' The Or operator sets the bit for the corresponding flag.
lngFlags = lngFlags Or ADS_UF_ACCOUNTDISABLE
' Assign the new value to the userFlags attribute of the user object.
objUser.userFlags = lngFlags
' Save the changes.
objUser.SetInfo
WScript.Echo "Done"