Question Locked

Logoff script

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

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?

2 replies

by scott_heath

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

This discussion is closed to new replies.