Re: Record startup/shutdown times
From: Sean Gahan (sean_at_optistreams.net)
Date: 08/26/04
- Next message: Tim Houle: "Re: Disabling Component in TD"
- Previous message: Heidi Linda eMVP : "Re: Disabling Component in TD"
- In reply to: Dwayne: "Record startup/shutdown times"
- Next in thread: Yaron Maor: "Re: Record startup/shutdown times"
- Reply: Yaron Maor: "Re: Record startup/shutdown times"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 26 Aug 2004 09:30:34 -0700
Dwayne,
For the logging on/off of users I would try something like this when the
user logs on:
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colComputer = objWMIService.ExecQuery _
("Select * from Win32_ComputerSystem")
For Each objComputer in colComputer
Const EVENT_SUCCESS = 0
Set objShell = Wscript.CreateObject("Wscript.Shell")
objShell.LogEvent EVENT_SUCCESS, _
"Logged on: " & objComputer.UserName
Next
*the source will show up as WSH
as far as logging when the computer boots or shutdown you could easily make
something like this a service, or use group policy editor to mention some
options.
Regards,
Sean Gahan
"Dwayne" <dmcmurchy@identecsolutions.com> wrote in message
news:0b2601c48b85$78880d70$a601280a@phx.gbl...
> I've searched high and low and all I can find are programs
> that are pretty much spyware/keyloggers for recording the
> startup and shutdown times in Windows. Does anyone know
> of something already built-in to Windows that records the
> time that a system starts up and shut downs? Also is
> there a way to record when a user logs into the computer?
>
> I would like these entries to be logged to the Event
> Viewer of our Embedded systems.
>
> Thanks for you input.
- Next message: Tim Houle: "Re: Disabling Component in TD"
- Previous message: Heidi Linda eMVP : "Re: Disabling Component in TD"
- In reply to: Dwayne: "Record startup/shutdown times"
- Next in thread: Yaron Maor: "Re: Record startup/shutdown times"
- Reply: Yaron Maor: "Re: Record startup/shutdown times"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|