‘Desenvolvido por Adriano Mendes – a.mendesaguiar@gmail.com
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:”& strComputer & “rootcimv2″)
Set colAdapters = objWMIService.ExecQuery (“SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = True”)
Set oNetwork = CreateObject(“WScript.Network”)
Dim fso, sf, StrNew
Const ForAppending = 8
Set fso = CreateObject(“Scripting.FileSystemObject”)
systime = Now()
StrNew=”c:” & oNetwork.UserName & “_logon.html”
set sf=fso.OpenTextFile (StrNew, ForAppending, True)
sf.writeline “O usuário ” & oNetwork.UserName & ” efetuou Logon na máquina ” & oNetwork.Computername & ” no dia ” & cstr(Date()) & ” às ” & cstr(Time()) & “
“
sf.close
Wscript.Quit