Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is ms-appdata?

I am building a modern ui app and want to, with a batch file, write and periodically update data accessible though the ms-appdata:// protocol in my winjs app. I have the batch file to copy folders, but I cannot find the file path of the appdata.

What is the default filepath for App1's appdata and how can I force my app to create the folder?

like image 342
Mooseman Avatar asked Jan 29 '15 20:01

Mooseman


People also ask

Where is Microsoft AppData?

The AppData folder itself is located on the system drive, normally C:\. Navigate in Windows Explorer as follows: “This PC” > “Local drive (C:)” > “User” > your username. The AppData folder is shown in the user's folder – the name assigned as the user. Clicking on it will take you to the subfolders.

What is MS AppData?

Path (ms-appdata) Storage. ApplicationData location are three reserved folders for local, roaming, and temporary state storage. The ms-appdata scheme allows access to files and folders in those locations.

Why can't I find AppData in files?

Normally, you will not find the AppData folder in your User Profile page because it is hidden by default. We will change the hidden settings and then access the file location. Make sure that you are logged in as an administrator. Press Windows + E to access the Windows Explorer.


1 Answers

ms-appdata:///[local | roaming | temp]/ maps to the StorageFolder returned from Windows.Storage.ApplicationData.Current.localFolder, roamingFolder, and temporaryFolder. See https://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.applicationdata.localfolder.aspx as an example. So you can obtain the appropriate StorageFolder from that API create folders and files from there, and then use ms-appdata URIs to refer to them.

Note that you always want to use the Windows.Storage.ApplicationData API to access those folders rather than using absolute pathnames. StorageFolder and StorageFile are the WinRT abstractions for pathnames and wholly replace them.

like image 113
Kraig Brockschmidt - MSFT Avatar answered Nov 22 '22 18:11

Kraig Brockschmidt - MSFT