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

Alternatives to AppData (Windows) when storing files on other OS

I'm working on a game project in Java and I need to store the config.ini file somewhere other than the executable jar location. I know people usually save them inside AppData on Windows, but I'd like to make my game completely portable with no OS…
Renato Geh
  • 78
  • 9
2
votes
2 answers

Allowing administrators to modify user's settings from within my program -- what's my best option?

I've been working on making my app easier to use for administrators. One of the things I'd really like to do is allow admins to modify other user's settings from within the program -- while still making it possible for regular ol' users to modify…
ZZZzzz
  • 85
  • 1
  • 6
1
vote
0 answers

How to create appdata folders for a service a in setup project (C#)

I am trying to create folders for my C#-service that is being installed with the vs2010 installer/setup project. I have almost all of it working, but I can't figure out how to add the appdata folder. The difference to all other solutions I have…
galmok
  • 869
  • 10
  • 21
1
vote
0 answers

How do I obtain the AppData or equivalent folder path in C++ that works on Linux and Windows?

I am making a game and I'm using the AppData\Roaming folder to store the file that contains the high score. I'm using the _dupenv_s() function to get the path to this folder. However, on Linux the _dupenv_s() function throws an error: ‘_dupenv_s’…
1
vote
1 answer

JS get AppData/Local/Packages/ path

I have a UWP app that uses WebView to display my web content. Installing my app on windows creates C:/Users/[USER_NAME]/AppData/Local/Packages/[MY_APP_NAME]/[SOME_FOLDER] Is there any way in js to retrieve the path to this folder? I don't want to…
YTG
  • 956
  • 2
  • 6
  • 19
1
vote
1 answer

Cannot npm install --save electron because group policy prevent CMD execution in %appdata% folder

Issue Our group-policies does not allow to execute cmd files from the windows %appdata% folder. When I try to install electron this error happens: npm install --save electron npm ERR! code 1 npm ERR! path…
user3772108
  • 854
  • 2
  • 14
  • 32
1
vote
1 answer

MSBuild: How Get AppData Local Directory?

I need help getting the AppData Local directory for MSBuild. File…
Mike Rosenblum
  • 12,027
  • 6
  • 48
  • 64
1
vote
1 answer

How to use resource qualifier names in UWP AppData folder

For my UWP app, I'm trying to move some assets to my AppData folder. I'm surprised that I've seemed to lose the option of using qualifier names in the process. For example, for the following pair of…
Ben Jasperson
  • 300
  • 4
  • 17
1
vote
2 answers

How can I create a directory and make a file in %appdata% path of windows in C language

I successfully created a directory or folder and I also managed to create a file in that directory but how can create a directory and a file in the user's appdata local if I don't know what is their username or their user folder name? thanks! I used…
Pyromagne
  • 45
  • 8
1
vote
1 answer

C++ : How to get actual folder path when the path has special folder names

I am trying to find a way to convert a path like this: "%APPDATA%\xyz\Logs\Archive" to this: "C:\Users\abcUser\AppData\Roaming\xyz\Logs\Archive". I am on Windows platform. I use Unicode character set. I can use C++17 if required. I can use boost…
Humayun Khan
  • 63
  • 1
  • 5
1
vote
1 answer

`os.system` not able to find file created by `with open` and read by `with open`

In a Python3 program running in Windows 10, os.system() is not able to find a file created in the APPDATA directory using with open, even after that same file can be successfully read by a subsequent with open. QUESTION FOR THIS OP: What specific…
CodeMed
  • 9,527
  • 70
  • 212
  • 364
1
vote
2 answers

Extract a rar file in a double quoted folder with python

Hi how i can add the double quotes to a folder ? with a initial " and a final " ? in a python file without receiving errors ? this is the bat file with quotes rar.exe x -o+ -p12345pass temp.rar "%Localappdata%\Temp\" and this is the python file…
M.Casey
  • 13
  • 3
1
vote
0 answers

Use application data specific to user in services running through Network Service account

I have a Azure DevOps Pipeline configured to run over Network Service account. It tries to run an application which stores its settings in the user's Roaming AppData folder. When, I try to run the application through the pipeline, it throws errors…
Kaveesh
  • 388
  • 6
  • 14
1
vote
0 answers

Get default user data directory in Node.js

I have a NPM project that I need to save some JSON files of the settings of the user to be re-used on a restart. However, I want these settings to work across all projects the user has made. Is there a way to get the default user dir,…
divinelemon
  • 1,925
  • 2
  • 23
1
vote
0 answers

Remove [eid]_[hash] in AppData

Just a hobby and not well-verse in C#. Here's the problem: The user.config of my executable is stored in the ...\Executable Name_[eid]_[hash]. This would be great if the user opens up my executable in ONE location. However, since the user may open…
JKaplan
  • 11
  • 1