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.
'BIND TO USER OBJECT TO GET USERNAME AND CHECK FOR GROUP MEMBERSHIP LATER
'----------------------------------------------------------------------------------------------
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
UserFullName = UserObj.name
UserFullName = UserObj.Get("givenName")
strInitials = UserObj.Get("initials")
strSn = UserObj.Get("sn")
strDisplayName = UserObj.Get("displayName")
Dim WshShell, WshEnv, objFSO, WshNetwork
Const OverwriteExisting = True
'Configures Variables
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = WScript.CreateObject("WScript.Shell")
Set WshEnv = WshShell.Environment("Process")
Set WshNetwork = CreateObject("WScript.Network")
Set objSysInfo = CreateObject("ADSystemInfo")
Set objDomain = getObject("LDAP://rootDse")
DomainString = objDomain.Get("dnsHostName")
'Grab the user name
UserString = WshNetwork.UserName
Set objCurrentUser = GetObject("LDAP://" & objSysInfo.UserName)
Set UserObj = GetObject("WinNT://" & DomainString & "/" & UserString)
strUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUser)
strFullName = objUser.FullName
strFirstName = objUser.FirstName
wscript.echo "Full Name " & strFullName
wscript.echo "First Name " & strFirstName
wscript.echo "strUser " & strUser
wscript.echo "Username " & UserString