Back to this... I know it's been talked about here a few times, but here's a new thread. Since I've always used NSIS to build installers, I've written a NSIS script which includes the choice to automatically add the scenery to the Scenery Library after it is installed. However in this case, the installed scenery is landclass, so it needs to be shifted in priority so that it doesn't take priority over photo scenery. So at the moment, my script determines the priority (layer number) of Addon Scenery, and tucks my scenery after it. Slightly complicated in this case because there are 2 scenery folders to add. I did assume that most Scenery.cfg files would be nice and tidy, especially if most users made changes only through the Scenery Library within FSX, but testing has shown that there are a lot of messy cfg files out there, with gaps and layer numbers out of order. So what would you expect a tool like this to do? With a nice tidy cfg file, where area numbers = layer numbers, it simply inserts the new entries after Addon Scenery and renumbers everything after. But what should it do if it isn't so tidy? Should it 'repair' the cfg, i.e. renumber everything so that area=layer? Should it insert the new Areas after the Addon Scenery Area (given that it is really the Layer number which determines priority, and this is really what is being set in relation to Addon Scenery)? Should it add the new Areas to the end of the cfg file, and just tweak the Layer? What I really want to do is to make sure that I don't leave the Scenery.cfg messier than I found it, but then again I'd rather not do a complete 'repair'. And lastly, would this script be of use to anyone else once it's finished?