09-27-2020, 05:34 PM
(This post was last modified: 09-27-2020, 05:34 PM by ScenseGuru.)
Hi,
There are ways of doing this with Scense internal variables backed by System Parameters, but probably the easiest way of doing this is by adding a Scripting Action to your logon script with the following content:
After executing this scripting action you can use these variables the way you suggested.
Cheers
There are ways of doing this with Scense internal variables backed by System Parameters, but probably the easiest way of doing this is by adding a Scripting Action to your logon script with the following content:
Code:
Sub Scense_Main()
' Prepare the environment accessor
Set wshShell = CreateObject( "WScript.Shell" )
Set wshUserEnv = wshShell.Environment("USER")
' Reference the current user
Set objSysInfo = CreateObject("ADSystemInfo")
Set objUser = GetObject("LDAP://" & objSysInfo.UserName)
' Set the environment variables
wshUserEnv("FirstName") = objUser.givenName
wshUserEnv("LastName") = objUser.lastName
wshUserEnv("Department") = objUser.department
End Sub
After executing this scripting action you can use these variables the way you suggested.
Cheers