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
5
votes
1 answer

Why would one ever use the %TEMP% folder now that Storage Sense can clean it at any time?

Starting with Windows 10, Storage Sense has allowed users to specify %TEMP% folder cleanup that are as frequent as once a day. Technically it can run even more often is set to activate on low disk space, depending on one's disk usage patterns. In…
Ohad Schneider
  • 36,600
  • 15
  • 168
  • 198
5
votes
1 answer

When should I opt for IsolatedStorage versus AppData file storage?

I've recently discovered the IsolatedStorage facilities in .net, and I'm wondering when I should use them for my application data versus when I should use (e.g.) Application.LocalUserAppDataPath. One thing that I've noticed is that Application…
Greg D
  • 43,259
  • 14
  • 84
  • 117
5
votes
1 answer

Get AppData\Local folder for logged user

I'm currently using: Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) To retrieve current user's AppData\Local path. The program requires elevated privileges and running it under standard user session throws a prompt…
Vilda
  • 1,675
  • 1
  • 20
  • 50
5
votes
1 answer

How to use Application Data in an (App.config) connectionString

I've got an SQL Server CE database in a project that I wan't to store somewhere in the %AppData% directory. However I can't find a way to make a reference to the Application Data path in the connection string (in the App.Config)
Sander
  • 616
  • 1
  • 6
  • 17
5
votes
3 answers

Windows: Which folders always offer write permissions?

The question is really clear. Which (Windows-) folders always have write permissions? So I need to find a folder which always has write permissions on any system for any application. Currently I used %AppData% but I got notifications from some users…
adroste
  • 758
  • 1
  • 7
  • 17
5
votes
2 answers

Inno Setup Installing to AppData\Roaming on Windows Vista/7 and newer, but Application Data on Windows XP

I have made several scripts for inDesign. Now I want to distribute them all in a setup file. Since inDesign scripts reside in different locations on XP and Vista (or above), I'm having some problems. My compiled setup works fine under Windows XP but…
coldbreeze16
  • 87
  • 1
  • 6
5
votes
1 answer

Node Read File From %appdata%

I am running node and I want to read a file from the %appdata% folder and I would rather not hard-code that path. This is basically what I have so far: //...require(some things) var fs = require('fs'); var fileData; try{ fileData =…
DeadEli
  • 983
  • 2
  • 13
  • 28
5
votes
2 answers

How do you locate a folder inside of Roaming using C#?

I'm trying to figure out a way to navigate to a sub folder in Roaming using C#. I know to access the folder I can use: string folder = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); What I'm trying to do is navigate to a…
user3896290
4
votes
1 answer

What is the default pgpass.conf location for the user running PostgreSQL service on Windows 10?

On Microsoft Windows, the pgpass file is located as followed: On Microsoft Windows the file is named %APPDATA%\postgresql\pgpass.conf (where %APPDATA% refers to the Application Data subdirectory in the user's profile). source:…
soliz
  • 735
  • 1
  • 7
  • 17
4
votes
1 answer

ASP.Net MVC SQLExpress Production Environment Update Scenario

New to actually deploying a Asp.Net MVC web application with sqlexpress in the App_Data folder, how would I handle database updates after it is live and in use. Here's my scenario and a few questions: I have an Asp.Net MVC 2 Web app w/ sqlexpress…
jrob
  • 532
  • 1
  • 6
  • 16
4
votes
2 answers

Where is Win7's jump list system data stored?

As per Jumplist Extender, I'm trying to prevent other apps from refreshing their jump lists (it's assumed that the user WANTS to do this, seeing as this is a JL editor.) One idea is to look for file or registry changes, where the data may be stored,…
DigiMarco
  • 97
  • 1
  • 2
  • 9
4
votes
4 answers

how to get 32 bit application data folder from 64 bit application on 64 bit Machine using c# code

I am facing very strange issue: I got a 64 bit c#.net application on 64 bit Windows Server 2008 R2 machine and it is being invoked by a Windows Service and it is started under Local System User, Moreover,this 64 bit c#.net application launches 32…
Yogesh
  • 3,044
  • 8
  • 33
  • 60
4
votes
3 answers

Windows application data directory

With the environment variable %allusersprofile% I can get the directory where common settings are stored. But most programs store their settings in the sub-folder "anwendungsdaten" (German, application data). Is there a way to get the direct path to…
user301940
4
votes
4 answers

Creating and using c# Application Folder

I am creating an application that uses photos and an XML file all in one folder that I am creating manually, I want to let the user update the data of that folder (Adding Photos, and Editing the Xml file) at run time via the application my question…
4
votes
1 answer

Environment.GetFolderPath(Environment.SpecialFolders.ApplicationData) returns C:

I have encountered a very strange behavior on the computer of one of my clients and I cannot find any clue as to why it happens: When the application calls Environment.GetFolderPath(Environment.SpecialFolders.ApplicationData) the return value will…
Franz B.
  • 442
  • 9
  • 22
1 2
3
19 20