That's another reason why programs shouldn't be saving their prefs in the ENVARC: directory. You can't use GetENV to retrieve multi-line prefs (try getenv ContextMenus.cfg) because you only get the top line. Programs that are saving multi-line prefs in ENVARC: and reading those prefs upon program startup are doing so by direct manipulation. I only directly manipulated variables to prove that most of the ENVARC: data is being copied to ENV: when the system boots (Somewhat confirmed by Colin).[/quote]nbache wrote: Remember that env variables are supposed to be changed by using SetEnv, with the SAVE switch if you want to change it permanently, and without if you only want to change it for the duration of your session. The behaviour of modifying the saved value by direct manipulation is not necessarily defined.
I'm not sure I need forgiven for trying to prove to the people who always jump in and tell me that I'm wrong when I mention that most of the ENVARC: contents are copied to ENV: when the system boots.And why would you? If you respond "For curiosity", then all is forgiven, otherwise, I'd like to see a practical case where this would be useful to do.
Here is yet another method of demonstrating that most of the ENVARC: files are copied to ENV: when you boot your system:
Insert a bootable CD in your CDROM drive.
Turn on your computer and wait for the system to boot.
Open a shell and enter the following:
copy C:Copy TO ram:
copy C:Dir TO ram:
cd ram:
Remove the boot CD from the drive.
Enter the following in the shell you opened:
copy ENV:ContextMenus.cfg TO RAM:
dir ram:
Clipboards (dir)
T (dir)
AmigaAMP.prefs Copy Dir
How did I copy AmigaAMP.prefs from ENV: with the CD removed if it wasn't copied from ENVARC: to ENV: when I booted?? If you are opposed to directly manipulating ENV: then you can enter "GetENV ContextMenus.cfg" instead of "copy ENV:ContextMenus.cfg TO ram:" and you will see a single line of the ContextMenus.cfg (unless it's a blank line).
I'm not trying to insult anyone. As I mentioned above, I'm just tired of people jumping on me when I mention that most of ENVARC: is copied to ENV: when you boot OS4. I only mention it as another reason why 3rd party programs shoudn't be saving their prefs files in the ENVARC: directory.