Application Data folder on Windows

This is a discussion on Application Data folder on Windows within the Tech Board forums, part of the Community Boards category; Half of my support calls on Windows are related to my application "losing its preferences." When I started programming for ...

  1. #1
    Registered User
    Join Date
    Mar 2007
    Posts
    142

    Application Data folder on Windows

    Half of my support calls on Windows are related to my application "losing its preferences."

    When I started programming for Windows, everyone said you should not put preferences and
    settings into MyDocuments but instead applications should keep such stuff in Application Data
    (CSIDL_APPDATA). Wherever you looked, users were complaining about "stupid" applications
    that create their folders and files in MyDocuments. People just hate it.

    Well, after three years with the Windows version I think I have a problem. No one is backing
    up Application Data. This morning I had a call from a guy who lost the setting after he moved
    to a new computer and just 30 minutes ago some girl told me about an IT guy yesterday who
    did something on her computer and now my application behaves as if it was just installed.

    What am I supposed to do? Move my preferences to MyDocuments and play dumb?

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    Installing to my documents is taboo. I hate it, because it's so darn cluttered.
    You can't be faulted because users are stupid, or does something unpredictable.
    That is what I believe.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  3. #3
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    But how do I solve my problem? I don't enjoy arguing with my customers.

  4. #4
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    That is not something I know the answer to... why does it work when in the my documents folder and not the application data?
    If you put it into the my documents folder, you will get heat from those who do not wish it there... and if you put it in the application data folder, where it belongs, you get heat from the customers? I think you need to educate them a bit.
    Tell them that the application stores its settings in the %appdata% folder and tell them to back it up if they wish to keep the settings. That is the wisest solution that I know of, something that all computer users should know.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  5. #5
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    They should back up "Documents and Settings" -- which as its name indicates is settings and documents. Long gone are the days when it was only "My Documents".

    Perhaps put a note in your software or make it obvious to the users, in installation for example.
    Last edited by zacs7; 11-26-2008 at 05:20 PM.

  6. #6
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    make an online database to store everyone's settings .

  7. #7
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,189
    keep them in a settign file in teh applications folder... honestly, its like people completely forgot how things worked before there was a registry.

    whatever you do dont put them in teh registry, that thign is so bloated with crap already I have to manually clean mine out every 6 months.
    Until you can build a working general purpose reprogrammable computer out of basic components from radio shack, you are not fit to call yourself a programmer in my presence. This is cwhizard, signing off.

  8. #8
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Quote Originally Posted by abachler View Post
    keep them in a settign file in teh applications folder... honestly, its like people completely forgot how things worked before there was a registry.

    whatever you do dont put them in teh registry, that thign is so bloated with crap already I have to manually clean mine out every 6 months.
    Exactly. I don't see the purpose of the Documents & Settings directory. Why can't every program just keep their crap in their own directories?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  9. #9
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by cpjust View Post
    Exactly. I don't see the purpose of the Documents & Settings directory. Why can't every program just keep their crap in their own directories?
    Because stupid users need ONE folder where they can keep all their crap!

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  10. #10
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    I'm siding with mats. Makes it more organized that way and easier to back up application data and settings.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  11. #11
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    Quote Originally Posted by zacs7 View Post
    They should back up "Documents and Settings" -- which as its name indicates is settings and documents.
    Unfortunately, this folder is hidden on most computers used by non-techies.

    Quote Originally Posted by cyberfish View Post
    make an online database to store everyone's settings .
    Yes, and then find myself on some forum blamed for spying on people.

    Quote Originally Posted by abachler View Post
    whatever you do dont put them in teh registry, that thign is so bloated with crap already I have to manually clean mine out every 6 months.
    No sweat. I am a Mac user so I still don't get it why Microsoft invented the Registry. I use it
    only during install just for icons and associations. Nothing else.

    Quote Originally Posted by cpjust View Post
    Why can't every program just keep their crap in their own directories?
    I'm not sure applications can write there if used by non admins. And I agree with others
    that keeping all the personal stuff at one place is better design. Just don't understand why
    they made that place invisible for regular users.

    I can't recall I ever had to deal with users losing my prefs on Mac in 15 years. It probably
    happened few times, but I don't remember anyone ever bothered me about it.

  12. #12
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,892
    If an application were to store its data in its home directory, you'd have the following problems:
    1) Application needs write access to its home directory. Since this directory is admin area, this means you need admin access.
    2) Application needs to differentiate between settings for different users. Moreover, one user can access and modify the settings file of another.

    Both problems can be fixed on the OS side to a point. Vista has user overlays - if an unprivileged user tries to write to a protected area, Vista creates an overlay, which is basically a directory stored in the user's own area, whose contents are merged with those of the real directory.

    But this feature is very new. Separation of users by different directories is as old as different directories and different users. It's still the way to do it on Linux. (But then, Linux really doesn't have a concept of "one directory per application".)
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  13. #13
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,171
    Quote Originally Posted by idelovski View Post
    ...Just don't understand why they made that place invisible for regular users.
    They hide it so casual users won't wonder WTF is that and try to delete it, or do something other stupid with it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.
    For information on how to enable C++11 on your compiler, look here.
    よく聞くがいい!私は天才だからね! ^_^

  14. #14
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,145
    Yes, and then find myself on some forum blamed for spying on people.
    Unless you make it clear that you are doing this?

  15. #15
    Registered User
    Join Date
    Mar 2007
    Posts
    142
    Quote Originally Posted by Elysia View Post
    They hide it so casual users won't wonder WTF is that and try to delete it, or do something other stupid with it.
    ... like back it up?

    Sorry - couldn't resist!

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data link / Application layers
    By ltcabral in forum Networking/Device Communication
    Replies: 1
    Last Post: 04-09-2008, 05:45 AM
  2. read only folder on Windows
    By George2 in forum Windows Programming
    Replies: 2
    Last Post: 11-05-2007, 08:18 AM
  3. How does windows pass data to drivers?
    By Xanth in forum Windows Programming
    Replies: 1
    Last Post: 10-21-2006, 12:38 PM
  4. How do you program a windows application?
    By Chrisab508 in forum Windows Programming
    Replies: 8
    Last Post: 10-18-2003, 10:21 AM
  5. FlashWindowEx not declared?
    By Aidman in forum Windows Programming
    Replies: 3
    Last Post: 05-17-2003, 02:58 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21