Hi, I am a bit surprised by the answers so far. For starters you cant hard code C: or D: or whatever. C: does not even have to exist; I have seen systems that boot and run from D: Second, you cant use CurrentDirectory, as Dave pointed out. You can not even use it if you store its startup value, since one may start an app with its CD preset to whatever value one chooses (try creating a desktop link, and watch its properties). third, wherever the app (the exe file) is located, you are not guaranteed that you can write to that folder. Unless your normal use is only reading that file, you should choose another place. The easy way out is by using the special folders, as can be found in the Environment.SpecialFolder enumeration; you will find some that are user-independent, others are user-specific. So I suggest reading up on that class. :)
Luc Pattyn [My Articles] [Forum Guidelines]