Systems are configured as if they leave the system the system will automatically get locked after 5 minutes.
What I need is the automation should be able to log the away times..so if the computer is locked....the user is away.
I want to create a Time Tracker. Which will start with windows (xp-sp2) and log the time in a text file / excel spreadsheet.
Whenever a user away from his/her system the time needs to be automatically logged.
Please give me idea/s. Thank you.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Your workout is excellent. But I need something which is self executable and the end users will have completely no interaction with the application. application will start with the windows and run till the system shut down..again will trigger at system restart and log and save the activity time, idle time into a notepad or excel file and the log file saving path I want to configure through the code.
So this will be something like windows event management log but customized as I want.
Also, tell me what are the tools I required for this.
Appreciate your valuable time and help. Thank you.
<< But I need something which is self executable >>
I take it you tested the code in excel macro?
Does this mean that you don't have access to a compiler like Visual Basic 6.0?
The above could be compiled into an activex dll from which you could execute in a VbScript. I could compile it for you but you won't be able to go back and customize anything yourself.
egl1044: things are getting perfect for us!
I actually want to do this by using VB 6.0. I have VB suit. You do not need to compile this for me.
But as I have studied the code..my understanding is the above code is not able to prepare any sort of Report.
I believe you have understood what I need. Apart from that I also need your help on the guidance of how do I go step by step and make this working.
Thank you.
You can add a string entry into the registry under the following key.
HKEY_LOCAL_MACHINE\SOFTWAR
ex. MyApp=C:\Windows\System32\
The above will run your program when windows boot.
I have added a simple (WriteLog) example but what I won't do is write the entire application for you but I will most certainly help you get started. You should have enough information to complete your application. Give it a test run and see how it works.
The file thats created will write to log in a format similiar to the below:
6/19/2009 9:53:45 AM USER AWAY
6/19/2009 9:54:45 AM USER BACK
6/19/2009 9:55:45 AM USER AWAY
6/19/2009 9:56:13 AM USER BACK
6/19/2009 9:57:13 AM USER AWAY
6/19/2009 9:57:17 AM USER BACK
suvmitra, I am more than determined to help you but your asking alot here. You can always open new questions in the visual basic area if you need more assistance with your application. I have provided you with everything you need that pertains to your original question. The only reason is it seems like I am writing the application for you rather than helping which is not my intentions.
I hope everything works out for you :)
egl1044: I am trying this with Vista sp1 and VB 6.0 Sp 6.
Step#1:
I am creating a standard exe file.
Step#2:
I am inserting a Class Module (not a module)
And I am putting the module code there (As you stated).
Step#3:
I am putting the Form code there (As you stated).
Option Explicit
Private Sub Form_Load()
' Hide form from the user?
Me.Hide
' Hide from the task bar?
App.TaskVisible = False
' Begin the idle callback. [using 1 minute for debugging]
If IdleDetectionBegin(1) Then ' change to 5 min later.
' Prepare log file here.
Call OpenEventLog("c:\test.txt"
Else
MsgBox "Error: IdleDetectionBegin failed", vbCritical
End If
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
' End the idle callback.
Call IdleDetectionEnd
' Close handle to file.
Call CloseEventLog
End Sub
================
When I am compiling it is throwing an error at..
AddressOf
-------------
W
The project can be found here if you have trouble using the source code.
http://www.ee-stuff.com/Ex
Business Accounts
Answer for Membership
by: egl1044Posted on 2009-06-18 at 11:00:02ID: 24660065
How can you effectively be certain that the user is indeed away from the computer?
Do these users have some option to indicate they are leaving the system?