Question

Locked

Logoff script

By colm.obrien ·
Can anyone help me with a logoff script I have 20 users on a 2003sbs server on client machines running XPpro. I want a script which will record username and client machine name and time of logoff to a text file on public folder of server?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

VBScript and GPO

by scott_heath In reply to Logoff script

Use GPO to force a logoff script and write a vbscript that does something like this:

Set FSO = CreateObject("Scripting.FileSystemObject")
Set Net = CreateObject("WScript.Network")

Set LogFile = FSO.OpenTextFile("\\server\share\" & Net.ComputerName & ".txt",8,True)

LogFile.WriteLine Now & " - " & Net.UserName

FYI - I freehanded this and didn't doublecheck anything, so you may need to do a little Google work to get syntaxes right. Or reply to this an I'll test it for you.

Regards,
Scott

http://scottisageek.spaces.live.com

Back to Networks Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums