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
1
vote
2 answers

C# How to get the User AppData folder, NOT AppData\Roaming?

I used below code to get the user's AppData folder - Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) But what I got is "C:\Users\(users)\AppData\Roaming". Is there a way to only get "C:\Users\(users)\AppData"?
Alex Huang
  • 13
  • 3
1
vote
2 answers

Vscode - How using %APPDATA% in settings.json?

edit - nov 2022 - I didn't need this anymore, I've switched to Linux & Docker, no more coding under Windows Does someone knows how to refer to my APPDATA folder in my vscode settings.json file? I'm trying to set the path to my php-cs-fixer like…
cavo789
  • 185
  • 1
  • 13
1
vote
0 answers

Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) returns incorrect folder path

I have created a system tray application. From there I'm trying to get this path: "C:\Users\AppData\Local" But instead I'm getting this path: "C:\Users\Default\AppData\Local" I'm using this…
Vivek
  • 21
  • 4
1
vote
0 answers

Excel OLEDB /Jet connection strings & %APPDATA%

I have what is likely a common scenario. I have an MS-Access application split into front-end and back-end files. I want to set up users with an Excel spreadsheet that connects to data on the back-end. But rather than have everyone hit the back-end…
Eric G
  • 1,282
  • 8
  • 18
1
vote
1 answer

How to use appDataFolder & Google Picker without full drive scope permission?

Problem I have encountered: + Can not copy spreadsheet file, json file, .. to appDataFolder without full drive auth scope. + Can not copy spreadhshet file to specific folder that was indentify by Google Picker. What I expected to happen: Where…
brian
  • 11
  • 1
1
vote
3 answers

where is the correct location for Data folder in developing process C# deskTop app

i write desktop app in C# .... this app will auto generate an C/C++ code for an embededd system project so i have to copy some pre_writen drivers to the target folder (where the file is generated) the problem is i don't know where i can correctly…
Ibram Reda
  • 1,882
  • 2
  • 7
  • 18
1
vote
1 answer

What is the better way to store mdf file with installation

I made a perfect application and I have to make insallation for that app. But i have a localDB and there is my problem, how, and where to store mdf file. I had searched about it on google but I haven't arrived at a solution yet. I have tried two…
1
vote
1 answer

Where to store config for Windows service

I am developing a Windows service that uses a config.json file to store its configuration. When I developed it without a service, I stored the data in %APPDATA%\companyname\product. Now I am switching to real Windows service. When is run it as a…
William M.
  • 369
  • 1
  • 5
  • 10
1
vote
2 answers

C# set appdata or any special folder path in app config file

I was trying to find a way to use appdata path as my environment.currentdurectory which means I want to run the c# application from appdata folder and in my project I always used environment.currentdirectory. I couldn't find a way that I can set…
1
vote
1 answer

How to save files to AppData when using Microsoft Desktop App Converter to convert a Win32 app to UWP?

I have a game that was originally written in QuickBasic in the 1990's. I converted it into a Win32 app using QB64. I then used Microsoft's Desktop App Converter to package it as a UWP app and submit it to the Microsoft Store (it's been…
Dave Mackey
  • 4,306
  • 21
  • 78
  • 136
1
vote
2 answers

I cannot access wkhtmltopdf from my IIS on Windows hosted Web API

I developped an ASP.NET MVC WEB Api, and published it to IIS on my Windows machine. I am using NReco html to image generator inside my code as shown here. Problem is when I run the Action it throws me an exception: Access to the path…
nmrlqa4
  • 659
  • 1
  • 9
  • 32
1
vote
0 answers

Is my program responsible for removing the APPDATA roaming folde?

Our program is writing log files into %APPDATA%\MyProgram. Should our program be responsible in the uninstaller to remove these files? Are there any guidelines on how to work with the APPDATA folder? Is it possible to move files from \MyProgram…
Marnix
  • 6,384
  • 4
  • 43
  • 78
1
vote
1 answer

Changing location of Postman's data directory

My company has applied a max size limit on the Windows %APPDATA% folder. I checked and found Postman is the largest user of the directory. Is there anyway I can do to make Postman use a different data directory? I have looked around the Postman…
His
  • 5,891
  • 15
  • 61
  • 82
1
vote
0 answers

NSUserDefualts data is duplicated many times in the Preferences folder

We are storing a xml config file which contains several key-value pairs in UserDefualts. The size of the .plist after the data is stored into the USerDefualts file is in between 5-50MB based on the user config file. Recently in one of our beta…
Teja Nandamuri
  • 11,045
  • 6
  • 57
  • 109
1
vote
0 answers

Facing designer error "To prevent possible data loss before loading the designer, the following errors must be resolved: "

My project solution contains all class library projects. I have used many User controls for UI. While trying to open design view, Visual studio shows error "To prevent possible data loss before loading the designer, the following errors must be…
DipakM
  • 37
  • 6