It can be done. However, I use
Inno.
It installs the scenery folder (main folder, Scenery and Textures subfolders) with a single line; a flag that tells it to delete on exit.
If you search these forums, you will eventually run across a small, free, app that will auto install the scenery. I'm sorry I don't remember the thread.
2 steps:
1 - Installation: You install the scenery to your folder, load the app, install the app, run the app (the scenery config file is updated) and then have the installer remove the app when done (part of the install process). In Inno this is 3 lines, one to install the app, one to install the config file to that points the app to the scenery folder, and one to run the app, with a flag set to delete both files when done.
2- Un-install: This is a more work. Inno supports Pascal scripting…which is what you must do. But first let give all credit for this method to my colleague & mentor, Fermin Fernandez of
FSWidgets. I gave t a good try however, he had to come to the rescue
You essentially write a Pascal based sub routine that takes the EXACT name of your file area as a constant string. You also need an integer variable.
You first use Inno/pascal commands to find the directory where the Scenery.cfg lives. Then you start a do loop function that reads each section of the file, incrementing the integer variable each loop, until it finds the section that matches your file area (the string constant), - it then deletes the section (using the integer value as the section identifier) and drops out. of the Loop. If you have added scenery areas after the one you are deleting, no problem, FSX doesn't care if the list has a gap.
I'm on my MacBook Air so I don't have the code in front of me. If you decide to use Inno, let me know and I'll post it.