Windows - recording shut-down times

Luis luis at anachreon.co.uk
Fri Feb 20 04:20:30 CST 2009


Hiya,

You could parse the Event Log ('eventvwr' on the command line) and  
check for Event ID 6005, which has the start time for the Event Log.
Not too sure if 6006 or 6008 indicates when it has stopped, although  
I think you'd only need the start time and work out the rest from there.
Event ID 6009 should time with the start of the Event Log, and also  
includes the Windows version info, it that's of any use...

The PsTools from Microsoft have the 'psloglist' command line tool  
that give you access to remote machines and includes authentication  
access (can also dump the file to the server).

Another option is to use the built in script: cscript %systemroot% 
\system32\eventquery.vbs
Append '-?' (without the quotes!) to get the switches. You'll find in  
there several formats for the output file.

Cheers,

Luis.


On 20 Feb 2009, at 09:54, Jim Sims wrote:

>
> On Feb 20, 2009, at 10:28 AM, Jim Sims wrote:
>
>> I'm assuming that a Rev app that starts on startup would do the  
>> first bit but is there a way to record when the machine shuts down?
>
>
>
> I do not have a Windows machine here to test with.
>
> Would the following enable me to record when a a Windows (XP Vista  
> NT) shuts down?
>
>
> on shutdownRequest -- confirm with the user:
>   --  RECORD DATE & TIME HERE
>  pass shutdownRequest -- allow to quit
> end shutdownRequest
>
>
>
> sims
>
> sims at ezpzapps.com
> Skype:   sims.jim
> iChat:   techietours
> ______________________
> Opportunity by Design
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list