Quote:
....
However with 5000+ users
....
This has been said before but what's going to happen when 2 users login at (almost) the same time and both want to write to the log file? The first user will open the file and then the second user can't open it because the first user has it open.
Maybe making the name of the log file the same as the username? This will give you a large amount of files but it avoids the possibility of users being unable to open the file and therefore not writing to the file that the script ran then you got screwed up information imho.
After some time you could let a script match the filenames to a user list filtering out the ones did ran the script from the ones that did not.
Changed your script a bit hope you don’t mind.
Code:
Open(1,"\\server\kixlog$\" + @USERID + ".txt",5)
WriteLine(1,@userid +" Ran "+ @scriptname + " using " @wksta + " on " + @date + " - " + @time + @crlf)
Close(1)
_________________________
Mart
- Chuck Norris once sold ebay to ebay on ebay.