Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to know when I login to a computer or domain. I want a pop up show me who has been logged on before me and what time he was logged on and date. By using Group Policy Script.

share|improve this question

I've got a simple batch file set as a logon script for users via group policy:

echo %logonserver% %username% %date% %time% >> \\server\share$\logon.txt

I've set the share as hidden too (not ideal, but better than nothing if you're worried about security).

Regarding the "popping" up, you'd have to look into that one...

share|improve this answer
i also want to know where should i start from. like the scripting part – jason Feb 2 '10 at 19:27

add to that batch %computername%

take that text file and parse it with a vbscript using regex to find the line with a %computername% that matches the machine the user is logging onto. then have the vbscript do a console.writeline of that line from the txt file. has some good examples, just search for it there.

share|improve this answer
If you're going to do that you may as well use VBS for the whole thing. Please use your shift key in future as that answer is barely readable. – John Gardeniers Mar 9 '10 at 4:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.