Page 1 of 1 1
Topic Options
#115985 - 2004-03-11 05:32 PM Can I check the contents of a file?
HDClown Offline
Lurker

Registered: 2004-03-11
Posts: 2
I have an installer file that updates some files on a local computer that I want to run as part of a login script, however, I don't want it to run every timet he uesr logs in since it would be overwriting the same data all the time. One idea I have is to have my installer dumb a .txt file on the local HDD (say C:\) and have 1 line in there with a version number.

If Kix is capable, I'd have it check that version number inside the file and if it was not equal the version number coded in the Kix script, it would run the installer. If the version matched, it would install the script.

The installer itself would update that version # to be in line with the build revision I have packaged in the installer.

Is this something Kix can do?

Top
#115986 - 2004-03-11 05:39 PM Re: Can I check the contents of a file?
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
kix can do anything (almost)

It is usually a matter of how clever you are... but look into getfileversion() or getfiletime() might be a simpler method for what you want to do...
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#115987 - 2004-03-11 05:48 PM Re: Can I check the contents of a file?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
You should rather check the registry whether the application has already been installed, either by checking a native regkey or specifically creating one whenever you run the installer.

Edited by sealeopard (2004-03-11 07:08 PM)
_________________________
There are two types of vessels, submarines and targets.

Top
#115988 - 2004-03-11 07:06 PM Re: Can I check the contents of a file?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Cookies on the hard drive have a habit of of disappearing. A version check or a reg read is better. If there is nothing by default to key on, you can create your own key/value in the reg and use that. Users are less likely to seek out and destroy reg keys/values than cookies.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#115989 - 2004-03-11 07:22 PM Re: Can I check the contents of a file?
HDClown Offline
Lurker

Registered: 2004-03-11
Posts: 2
I didn't think of the registry, but I definately like that idea better. I knew Kix could do registry stuff, but wasn't sure on the file. The registry stuff should be much easier to do anyway.

Thanks.

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
1 registered (Allen) and 382 anonymous users online.
Newest Members
gespanntleuchten, DaveatAdvanced, Paulo_Alves, UsTaaa, xxJJxx
17864 Registered Users

Generated in 0.054 seconds in which 0.026 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