Questions tagged [appdata]

Used for questions relating to the user application data folders. Topics should be related to the use of the Windows APPDATA or USERPROFILE environment variables.

Windows Environment Variables

Environment variables are mainly used within batch files, they can be created, modified and deleted for a session using the SET command. To make permanent changes, use SETX

Variables can be displayed using either SET or ECHO.

Variables have a percent sign on both sides: %ThisIsAVariable%

Standard (built-in) Environment Variables include the following:

ALLUSERSPROFILE   C:\ProgramData
APPDATA           C:\Users\{username}\AppData\Roaming
LOCALAPPDATA      C:\Users\{username}\AppData\Local
USERPROFILE       %SystemDrive%\Users\{username}
                  This is equivalent to the $HOME environment variable in Unix/Linux 

Related Tags:

298 questions
91
votes
5 answers

How can I get the path to the %APPDATA% directory in Python?

How can I get the path to the %APPDATA% directory in Python?
fox
  • 15,428
  • 20
  • 55
  • 85
72
votes
2 answers

What is the difference between ProgramData and AppData?

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…
Ganeshja
  • 2,675
  • 12
  • 36
  • 57
59
votes
3 answers

Difference between 'SpecialFolder.LocalApplicationData' and 'SpecialFolder.ApplicationData'?

On my system, %AppData% leads to ApplicationData which is C:\Users\\AppData\Roaming But there is also C:\Users\\AppData\Local And for some more confusion D:\Users\\AppData\LocalLow string local =…
Tarion
  • 16,283
  • 13
  • 71
  • 107
42
votes
6 answers

How can i get the path of the current user's "Application Data" folder?

1)how can i find out the Windows Installation drive in which the user is working.? I need this to navigate to the ApplicationData in DocumentsandSettings. 2)Also how can i get the user name too so that i can goto ApplicaitionData.? Eg: "D:\Documents…
SyncMaster
  • 9,754
  • 34
  • 94
  • 137
29
votes
7 answers

Python: Getting AppData folder in a cross-platform way

I'd like a code snippet that gets the proper directory for app data (config files, etc) on all platforms (Win/Mac/Linux at least). For example: %APPDATA%/ on Windows.
user1438098
  • 2,239
  • 3
  • 18
  • 14
27
votes
6 answers

How to open a folder in %appdata% with C++?

As you all know, the appdata folder is this C:\Users\*Username*\AppData\Roaming on windows 7 Since my application will be deployed on all kinds of Windows OSes i need to be able to get the folder 100% percent of the time. The question is how do…
dikidera
  • 2,004
  • 6
  • 29
  • 36
22
votes
2 answers

Does Microsoft have a best practices document regarding the storage of App Data vs User Data on different Windows Platforms?

When creating an application that will be targeted to many versions of Windows what is the best practice to determine where application specific data should be stored. Specifically: Application Specific Data (e.g. app config data) User Specific…
Robert Groves
  • 7,574
  • 6
  • 38
  • 50
20
votes
4 answers

Accessing %appdata% with VB.NET

How can you access files in %appdata% through VB.NET? For example, C:\Users\Kuzon\AppData\Roaming\program. How would I access that file, but on another Windows 7 machine? Also, how would you do it on Windows XP? I believe it is %Application Data%.
Kuzon
  • 782
  • 5
  • 20
  • 49
18
votes
2 answers

How to create appdata folder with C#

I basically need to create a folder in the roaming application data of the current user running the program. Then I also need to access another folder in the application data section where I have a file that I want to copy into the application data…
Matt Hatcher
  • 663
  • 1
  • 4
  • 17
16
votes
3 answers

Windows 7: AppData folder not visible in windows explorer

I am somewhat new to Windows 7. I am running a foreign language version of Windows 7 (not sure if this matters or not). Anyways, when I use cmd to run a command prompt environment and C:\Users\MyUserNameHere> dir I don't see the folder named…
John Goche
  • 689
  • 2
  • 12
  • 27
15
votes
2 answers

How to get the application specific data folder (ProgramData)?

I need to read and write files that contain application specific data, shared between all the users. I tried to use Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), but it returns only C:\ProgramData. My question is : Does…
paulinodjm
  • 205
  • 1
  • 2
  • 6
14
votes
5 answers

IIS 7.5 application pool uses wrong %APPDATA% for custom user as identity

I want my MVC3 web application to access %APPDATA% (e.g. C:\Users\MyUsername\AppData\Roaming on Windows 7) because I store configuration files there. Therefore I created an application pool in IIS with the identity of the user "MyUsername", created…
AndiDog
  • 68,631
  • 21
  • 159
  • 205
14
votes
4 answers

Why was git installed in AppData instead of Program Files?

I installed the GitHub Desktop app in my Windows 7 from here and then restarted my laptop. I go to the Windows cmd and type git clone https://github.com/myName/myAwesomeProject.git and I get 'git' is not recognized as an internal or external…
slevin
  • 4,166
  • 20
  • 69
  • 129
12
votes
2 answers

What is the environment variable for AppData in NSIS installer script?

I am looking for the environment variable for AppData in NSIS. I need to copy fils to the AppData directory in my installation.
kakka47
  • 3,479
  • 8
  • 44
  • 52
11
votes
3 answers

How do i add an App_Data folder in visual studio?

This is a silly question but How do I add an App_Data folder to a project? i have an xsd file that i want to include into the project.
burnt1ce
  • 14,387
  • 33
  • 102
  • 162
1
2 3
19 20