Page 1 of 1 1
Topic Options
#112603 - 2004-01-27 04:12 PM Compare write to file?
cwhitmore Offline
Starting to like KiXtart

Registered: 2001-05-23
Posts: 102
Loc: Austin, Texas, USA
I plan to use the UDF CPUNAME to find out what PCs are outdated on our system. I'll have it write to a file with username and cpu speed. How can I make sure it only writes that person's record once? I don't want it writing every time someone logs in.
Top
#112604 - 2004-01-27 04:22 PM Re: Compare write to file?
Co Offline
MM club member
***

Registered: 2000-11-20
Posts: 1342
Loc: NL
create a trigger (can be a file) when this file exists then skip the script..

Something like:
Code:

If exist("c:\log\computer1.txt")
exit
endif

_________________________
Co


Top
#112605 - 2004-01-27 04:29 PM Re: Compare write to file?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Write to an .INI file instead using the computername as a section. This will ensure that each computer will have only one entry, e.g.
Code:

[WKSTA1]
CPU=Intel Xeon 3.06GHz
Memory=1024 MB
[WKSTA1]
CPU=Intel Xeon 2.4GHz
Memory=2048 MB



See READPROFILESTRING() for details.
_________________________
There are two types of vessels, submarines and targets.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1636 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.225 seconds in which 0.168 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org