Page 1 of 1 1
Topic Options
#31833 - 2002-11-05 07:41 AM Ini filesize problem........ (is there a size limitation?)
Boppe Offline
Lurker

Registered: 2002-11-05
Posts: 2
Hi,

Having browsed a lot through the forum and learned, I'm hoping you can help me with this one (first post).
I created a huge script copying SMS hardware/software inventory functionality supportinf all Windows OS's available. Everything working fine but, implemented on large networks the ini files (used for storing all the hardware information in pipe and quote delimited format for importing into a database) tend to grow quite a bit. When growing over approximately 50Kb, the WriteProfileString writes just half the line when a new machine wants to write his inventoried info and stops. New/Extra machines/lines don't get written at all.
In other ini files (software inventory) the ini file itself get's bigger but the individual lines are not as "wide"/the string after "@MACADDRESS" (="bla"|"bla"|... ) is not as long and works fine.

I know there is a max size on an ini file but haven't figured out a workaround within kix... Does anyone know a workaround ?

I'm using 3.63 with All OS's supported.... If you would like to see the code I have to e-mail it to you as otherwise this forum would be overloaded with code.... [Wink]

Hope you can help !

Boppe

(MCA: extend subject)

[ 08. December 2002, 14:12: Message edited by: MCA ]

Top
#31834 - 2002-11-05 08:13 AM Re: Ini filesize problem........ (is there a size limitation?)
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
Boppe,

welcome to the the board !
Yes, there's a size limit with ini files, just can't remember what it was (64k ???) ...
There is no workaround other than split it to several files as this is an api limitiation

hth

Jochen
_________________________



Top
#31835 - 2002-11-05 08:19 AM Re: Ini filesize problem........ (is there a size limitation?)
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
A deeper search on the board brought up that the size limit only applies to 9x systems ... NT and higher - no problem

J.
_________________________



Top
#31836 - 2002-11-05 02:37 PM Re: Ini filesize problem........ (is there a size limitation?)
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
As J said, the solution is to split out the file to multiple files and then have an admin script consolidate them.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#31837 - 2002-11-05 04:07 PM Re: Ini filesize problem........ (is there a size limitation?)
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
Or move up in the food chain and organize everyhting with a central database like MS Access, SQL Server, MSDE, or any other free DB like PostGreSQL, MySQL.
_________________________
There are two types of vessels, submarines and targets.

Top
#31838 - 2002-11-05 05:24 PM Re: Ini filesize problem........ (is there a size limitation?)
Boppe Offline
Lurker

Registered: 2002-11-05
Posts: 2
OK Thanks a lot guys. I now know I do not have to search any further.

BTW the limitation is, as far as I tested, not just 9x related. NT/2000/XP OS's might be able to work with large ini files using their own API's but using KIX 3.63 on higher platforms gave the same results... (Which does not explain it 'cause as far as I know kix calls native OS API's doesn't it ?)
It's probably a combination of KIX and large ini files.

Thanks !

Boppe

Top
#31839 - 2002-11-05 05:38 PM Re: Ini filesize problem........ (is there a size limitation?)
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Ok, "Monty Python and the Holy Grail" is making the rounds again. [Wink]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#31840 - 2002-11-05 06:07 PM Re: Ini filesize problem........ (is there a size limitation?)
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
> Yes, there's a size limit with ini files, just can't remember what it was (64k ???) ...

You are correct..

From the days of when W95 came out, Microsoft recognized the 64K limitation and went to the registry. [Smile]

Kent

[ 05. November 2002, 18:07: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#31841 - 2002-12-08 02:11 PM Re: Ini filesize problem........ (is there a size limitation?)
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

The 64KB limit is a theoretical one. We are running INI with size above 256KB.
More important is how fast your servers can react on WriteProfileString requests.

In the earlier days we were using complex keys, which creates nearly always an new entry.
Now we are using another method. The first file contains only short keys with an unique
result included. This unique value can point to a set historical files, which contains the
whole information about your environment.
To base the filenames of those historical files on f.e. date notation prevents too big
files, which can be hard to handle for catching useful information out of it.

Most important for us is, that most wanted information for trouble-shooting can
be available in a very shorttime.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#31842 - 2002-12-08 03:15 PM Re: Ini filesize problem........ (is there a size limitation?)
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
When using and INI file that is located across a network connection, the file size may not be as important as the network traffic generated and resulting latency because each WriteProfileString causes the complete READING and WRITING of the entire INI file and each ReadProfileString READS the entire file.
_________________________
Home page: http://www.kixhelp.com/hb/

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 132 anonymous users online.
Newest Members
MaikSimon, kvn317, kixtarts2025, SERoyalty, mytar
17872 Registered Users

Generated in 0.123 seconds in which 0.085 seconds were spent on a total of 13 queries. Zlib compression enabled.

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