That's a good point. I am writing the current CSV as one file in a central location that all open and write to. I don't know if there are lock issues going on or not. Like I said...the whole thing is hokie. I'm a novice KiXtart'er so my stuff is rudimentary at best because I patch borrowed code together until it does what I want!
Anyway...at present, the script gets PC Info and writes it to a CSV on my server and then copies a file from my server to the C:\ drive of the user's PC. Next time they logon, it checks for that copied file on local C:\ and if there, skips the code that gets info and writes to the CSV.
I am all about leaving the end-user PC out of the mix. I'd rather have the Kix logon script write the PC Info to a file of some kind and then next time around do it again and overwrite the previous data for that particular PC...its own entry (I thought of CSV only because was easy to make into a nice spreadsheet). That way, every logon gathers PC data and if something has changed, it is updated.
It seems INI file idea may help me accomplish this, but there still is the file lock question. What happens when 250 people logon at the same time?
BTW - here's my current code...
code:
If Exist($systemdrive+'\pcdata.ok')
Gosub "End"
Else Gosub "WriteInfo"
EndIf
:WriteInfo
$s = OpenFile("\\server\share\file.csv", "W", 1, 0)
If @error = 0
WriteLine($s, "@DATE, @TIME, @WKSTA, @USERID, @FULLNAME" + @CRLF)
Close($s)
EndIf
Copy $Netlogon+'\tempfile.tmp' $systemdrive+'\pcdata.ok'
Anyone have any good ideas?