Track the user login
Hi,
I have a DC on windows 2000 server i want to track the user login and logoff time and date through login script can anybody will help me on this ?
Networks
Hi,
I have a DC on windows 2000 server i want to track the user login and logoff time and date through login script can anybody will help me on this ?
by chaudhary.umesh Accepted solution
by jeff.doty Accepted solution
Hi,
Here is an excerpt from my logon scripts. Note that I use VBScripts for logon scripts. If you us batch files, you can just call the VBScript.
'***************************************************
' Dimention Variables
Dim objNetwork, colPrinters, objFSO, objShell, objProcessEnvironment
'***************************************************
' Setup Objects
Set objShell = WScript.CreateObject("WScript.Shell")
Set objProcessEnvironment = objShell.Environment("Process")
'***************************************************
' Set Variables
EnvLogonServer = objProcessEnvironment("LogonServer")
PCName = objProcessEnvironment("COMPUTERNAME")
UserName = objProcessEnvironment("USERNAME")
'***************************************************
' Add Logon event to Event Log
Msg1 = "Logon Event for User: " & UserName
Msg2 = ", Logged on PC: " & PCName
Msg3 = ", Logon Server: " & EnvLogonServer
Msg = Msg1 & Msg2 & Msg3
objShell.LogEvent 8, Msg
'***************************************************
This will put an entry into the Application Event Log.
This discussion is closed to new replies.
Sort by Trending