'' Пользователь
Set WSHNetwork = CreateObject("WScript.Network")
On Error Resume Next
Path = WSHNetwork.UserName
Set objSysInfo = CreateObject("ADSystemInfo")
strUserDN = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUserDN)
' Echo objUser.DisplayName
Echo objUser.Description
'' Компьютер
Set WSHNetwork = CreateObject("WScript.Network")
On Error Resume Next
Path = WSHNetwork.UserName
Set objSysInfo = CreateObject("ADSystemInfo")
strUserDN = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUserDN)
Echo objUser.DisplayName
Комментариев нет:
Отправить комментарий