خرید بک لینک

For some time now I've been using this script to view my login time for a particular computer:

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.GetFile("C:Windowssetupact.log")
Wscript.Echo "Log on today at " & FormatDateTime(objFile.DateLastModified,vbShortTime)

This is a Windows 7 Enterprise edition computer with Service Pack 1 installed.

Is it possible to modify the script to capture both the login and shutdown time? And, if so, is it possible to capture this for a set period (e.g. for the previous week or the previous 28 days)? The script doesn't necessarily have to store/save this info - I can live with just being able to view it.

I also came across this question, but this didn't help me much (beyond the fact that it opened my eyes to Event Viewer.

I have since discovered I can manually view the information I need by viewing various logs in Event Viewer, but I'm not sure if there is some way to leverage off this information in a script or not. Obviously this information must be 'stored' somewhere on the system, but I'm not entirely sure where and whether it's accessible.

Any suggestions would be most appreciated.

برچسب: نویسنده: استخدام کار تاريخ: چهارشنبه 1 ارديبهشت 1395 ساعت: 6:58

صفحه بندی