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.
'Adds users to local groups on computers
'Constants for text file manipulation
Const ForReading = 1
Const ForWriting = 2
Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
'Open and read the list of users
Set objUserFile = objFSO.OpenTextFile ("Users.txt", ForReading)
strText = objUserFile.ReadAll
objUserFile.Close
'Split list of users into an array and then clear the string
arrUsers = Split(strText, vbCrLf)
Set strText = Nothing
Set objWshNet = CreateObject("WScript.Network")
strDomain = objWshNet.UserDomain
strComputer = objWshNet.ComputerName
strGroup = "Administrators"
Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ",group")
For each strUser in arrUsers
'Configure to add a domain user to the Local Administrators Group
Set objUser = GetObject("WinNT://" & strDomain & "/" & strUser)
'If not already a member, add the user to the local Administrators group:
If Not objGroup.IsMember(objUser.ADsPath) Then
objGroup.Add(objUser.ADsPath)
End If
Next