What is the difference between ProgramData and AppData?
Asked Answered
L

2

75

I need to store some user-specific configuration data for my program. Both Application Data/AppData (in the user's directory) and ProgramData (in the root of the system drive) seem like reasonable places to put it.

What is the difference between Program Data and Application Data and which should I use?

Logorrhea answered 29/4, 2013 at 10:15 Comment(0)
T
101

To put it straight, ProgramData contains application data that is not user specific.This data will be available to all users on the computer. Any global data should be put in here.

AppData folder contains configuration settings, downloaded information/files for a particular user. So, for example any user specific preferences and profile configurations can be stored in the AppData folder. The AppData folder is further divided into three subfolders
Roaming - This folder contains data that can move with your user profile from a computer to another.
Local - This folder contains data that will not move with your user profile.
LocalLow - You can put in lowlevel access information such as information related to web browser running in a protected mode in this folder.

You can now decide depending on the type of information which would be the best place to store it.

Reference links: Windows CSIDL and AppData

Thymus answered 28/11, 2014 at 3:22 Comment(3)
Where should a log file created by the installer go? It sounds like a application specific. But it also sounds like a user specific at the same time w.r.t. the user who ran the installer (especially when it uses "Install Only for me" option during the installation). Why a user who didn't run the installer will care about its corresponding log file?Transalpine
Your definition of Local and ProgramData sound the same, would you like to clarifyPilsner
For the record; Iv'e stolen your post and used it here: #50758575 ;-)Snowclad
P
6

I think you should put all user specific files into appdata since it is located in

C:\Users\UserName\AppData

and Programdata is not specific to the user. It could be used, I think, to share data of your program when used by different users.

see this stackoverflow question

Porphyry answered 29/4, 2013 at 14:39 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.