Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capturing Logons and Logoffs with BgInfo & GPO?

Status
Not open for further replies.

spelk

IS-IT--Management
Oct 16, 2008
21
0
0
GB
I've set up a fairly straightforward run of BgInfo with two different configuration files (bgi files). One to record Logon event and one to record Logoff/Shutdown event.

I created an extra field, named Status, and in each of the config files, I load the contents of a different text file (one with the word LogOn in it, and the other with the word LogOff in it) into the additional field.

So in Default Domain Group Policy (of a Windows 2003 Server), I've attached the following BgInfo shell commands (in vbs scripts) to the Logon/Logoff and Shutdown policies.

Logon
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("\\server\logging\BgInfo \\server\logging\BGInfo_LOGIN.bgi /Timer:0 /Silent /NoLicPrompt")

Logoff
Set objShell = CreateObject("WScript.Shell")
objShell.Run("\\server\logging\BgInfo \\server\logging\BGInfo_LOGOUT.bgi /Timer:0 /Silent /NoLicPrompt")

Shutdown
Set objShell = CreateObject("WScript.Shell")
objShell.Run("\\server\logging\BgInfo \\server\logging\BGInfo_LOGOUT.bgi /Timer:0 /Silent /NoLicPrompt")

BgInfo is set to pump the data into a SQL Server database, and it seems to be working fine for Logon's, but is not firing for Logoff or Shutdown events. Running BgInfo manually with the appropriate command line settings, stores the LogOff tag into the status field, but it just won't record the event when a user manually Logs off, or Shuts down their system.

Is there something I'm missing here?

Any help would be most appreciated.
 
As a follow up, I found the answer to this problem:

By putting the BGInfo.exe and config files in \\server\NETLOGON, and changing the .vbs scripts to simple Batch files and attaching them to the GPO policies.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top