1 Replies - 1297 Views - Last Post: 11 March 2017 - 04:40 AM

#1 wtp   User is offline

  • D.I.C Regular

Reputation: 28
  • View blog
  • Posts: 338
  • Joined: 08-December 11

Is this directory ok?

Posted 11 March 2017 - 12:59 AM

I'm using Environment.SpecialFolder.ApplicationData to save a text files that I'm using in my program
In windows 7 it's this directory

I want the directory to always be writable and per user. I believe this directory is that. Someone told me to user the Program Files directory though, should I use that one? Is there a good reason? Could I always find this directory regardless of what version of windows I'm using?

Is This A Good Question/Topic? 0
  • +

Replies To: Is this directory ok?

#2 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Is this directory ok?

Posted 11 March 2017 - 04:40 AM

Don't use the program directory. That's very 1990-2000 thinking. Back then it was easy and you didn't have to do an work because the built-in fallback for an application when given only the name was to look in the same directory it was in. That's not today's world.

In the Win8-Win10 world the permissions changed. Hence a directory specifically for Application Data: AppData.
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1