Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ProgramData Folder 1

Status
Not open for further replies.

chelseatech

Instructor
Aug 25, 2001
1,812
NZ
Had a really productive session with the boys from Microsoft about how to make sure my app works under Windows 7 when it comes out.

One of the things I was doing wrong was to write files into the application directory. I should really be using the ProgramData folder. There is no guarantee that my app will be installed on the same drive as ProgramData so is there a function I can write that will tell me where ProgramData is on the machine my app is installed on.



Editor and Publisher of Crystal Clear
 
How about:

My.Computer.FileSystem.SpecialDirectories.AllUsersApplicationData

Regards
 
What version of Dot Net does that require? I'm still using the 1.0 Framework.

Looks like I might have to leave that until I upgrade my app to use a later framework.

Thanks for your help.

Editor and Publisher of Crystal Clear
 
I'm sorry. It's in VS 2005.
In Framework 1, you can try:

System.Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)

or any other Special Folder that you choose.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top