It depends on how "dynamic" the files are. If the files are static data--just being copied from your master data on setup, or generated dynamically in setup--the StartupPath must be the right solution I guess. You could also embed to your exe/dll.
If the files are dynamic--files may be updated after setup--Windows logo recommends files under Program Files not to be modified without setup involved. Users/admins could lock down these directories and thus updates may fail. In that case, Application.UserAppDataPath/CommonUserAppDataPath are the right approach. -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED]] On Behalf Of Steven Livingstone Sent: Friday, July 26, 2002 3:50 PM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Application Installation Directory A good question. I have several folders containing (dynamic) Xml files in an application I am creating. I use the Xml as an alternative storage to a RDBMS - I'll have a class that determines which you want to write to. Question I did have was where to store all these files and where to reference them. I decided that the project directory of my main application was best and for each folder and put entries in the .config file to point to the file location. The idea being that are install time the full path would be entered into the .config file. The files in these folders are dynamic so it looks like this is the only solution... Unless you have any other ideas. Cheers, Steven. -----Original Message----- From: Moderated discussion of advanced .NET topics. [mailto:[EMAIL PROTECTED]] On Behalf Of Charlie Poole Sent: Friday, July 26, 2002 12:56 AM To: [EMAIL PROTECTED] Subject: Re: [ADVANCED-DOTNET] Application Installation Directory However... Was that the right question? I wonder if looking in the app directory isn't a bit old hat with .Net. Perhaps he should consider adding the file to the assembly. Charlie Poole [EMAIL PROTECTED] www.pooleconsulting.com www.charliepoole.org > The answer is.... Application.StartupPath > > or more fully (System.Windows.Forms.Application.StartupPath) > > - Michael Lehman > www-mikelehman-com > System Architect > > > At 04:50 PM 7/25/2002 -0500, you wrote: > >How do I return the path the the applications installation > directory to my > >app ?? > > > >I have a windows forms app that needs to reference a file that I am > >including in the installation along with the app. I need to open > that format > >file and output it to the printer. > > > >Thanks in advance, > > > >At the source of every error which is blamed on the computer, > you will find > >at least two human errors, including the error of blaming it on the > >computer. > > > >Steve Walker > >Hale-Halsell Company > >918-641-5249 > > > >You can read messages from the Advanced DOTNET archive, unsubscribe > >from Advanced DOTNET, or subscribe to other DevelopMentor lists at > >http://discuss.develop.com. > > You can read messages from the Advanced DOTNET archive, unsubscribe > from Advanced DOTNET, or subscribe to other DevelopMentor lists at > http://discuss.develop.com. > You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.