Re: Record startup/shutdown times

From: Sean Gahan (sean_at_optistreams.net)
Date: 08/26/04


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.



Relevant Pages

  • Re: Group Policy not applying over Network to XP users
    ... If a user logs on and does not get it what happens if he/she logs ... > I've modified the screen saver policies in the Default Domain Policy. ... > When logging on locally at the Domain Controller with my 2 different ... > roaming profile configured. ...
    (microsoft.public.win2000.active_directory)
  • Re: Roaming Profiles not syncronizing
    ... > user profile to match the user logging on which might possibly be the issue. ... "Profiles" share on the server when the user logs off. ... Also the log file says something about the "Profile" share being mapped as ...
    (microsoft.public.windows.server.active_directory)
  • Re: Logging Logins
    ... > I'm trying to setup a logging system so that whenever a user logs into the ... And if the user is root or su's to root I'd like to log that as well. ... > I'd like to be able to record how they are logging in whether it be locally, ... you having problems with the syslog logging? ...
    (comp.os.linux.security)
  • Workstations Take a long time to logon
    ... All clients are XP pro. ... When a user logs ... No problems when logging on ...
    (microsoft.public.win2000.general)

Quantcast