Finding the best folder for all users on a Windows machine

Posted by reallyjoel on Stack Overflow See other posts from Stack Overflow or by reallyjoel
Published on 2010-03-08T17:01:48Z Indexed on 2010/03/08 17:06 UTC
Read the original article Hit count: 317

Filed under:
|

We are making a game which will add a level editor feature soon. We want the user to be able to put levels he's downloaded in a folder and then play it in the game, without any hassle. So, we're looking for a folder that anybody can find, open, write, read, and is multiuser. On Windows Vista / 7, the folder /Users/Public/ look like a great candidate. However, It's not listed in the .net enum System.Environment.SpecialFolder. I have went through them all, and checked what they yield on different Windows versions, and none live up to my requirements.

I did find Environment.SpecialFolder.CommonApplicationData, that kinda works, but that folder is hidden (C:\ProgramData) and I assume most users don't display hidden folders.

As it stands now, it looks like we'll have to settle for the personal documents folder, but we'd really like a multi user folder?

Anyone have any tips?

(Hard coding c:\Users\Public\ is out of the question, it will only work on english systems)

© Stack Overflow or respective owner

Related posts about c#

Related posts about .NET