appdata

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

孤人 提交于 2019-11-27 12:27:12
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 Data/Settings I know on Windows Vista for instance there are environment variables, like %APPDATA%, that could be used, but what about Windows 7, Windows XP, Windows 98. My main question is, does Microsoft have a best practices doc for this, outlining the file system locations for the different types of data (app vs. user) and the security implications

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

百般思念 提交于 2019-11-27 09:06:24
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 that user's profile by logging in with the account, and turned on the option "Load User Profile" (was true by default anyway). Impersonation is turned off. Now I have the problem that %APPDATA% (in C#): appdataDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) resolves to c:\windows\system32\inetsrv instead of C:\Users

How to get the %AppData% folder in C?

只愿长相守 提交于 2019-11-27 06:52:05
问题 As above, how do I get the AppData folder in Windows using C? I know that for C# you use Environment.SpecialFolder.ApplicationData 回答1: Use SHGetSpecialFolderPath with a CSIDL set to the desired folder (probably CSIDL_APPDATA or CSIDL_LOCAL_APPDATA). You can also use the newer SHGetFolderPath() and SHGetKnownFolderPath() functions. There's also SHGetKnownFolderIDList() and if you like COM there's IKnownFolder::GetPath(). 回答2: If I recall correctly it should just be #include <stdlib.h> getenv(

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

核能气质少年 提交于 2019-11-27 06:24:21
问题 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) <?xml version="1.0"?> <configuration> <configSections> </configSections> <connectionStrings> <add name="EntityConnectionString" connectionString="metadata=res://*/EntityModel.csdl|res://*/EntityModel.ssdl|res://*/EntityModel.msl;provider=System.Data.SqlServerCe.3.5

How to create appdata folder with C# [closed]

你。 提交于 2019-11-27 02:41:59
问题 Well, I don't know how to type all this so bear with me please. This is beyond me, I'm still a newb at C#. I basically need to create a folder in the roaming application data of the current user running the program. I also need to access another folder in the application data section and then replace a file with a copy of the file in the application data folder I had created. 回答1: The first two passes are straightforward // The folder for the roaming current user string folder = Environment

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

狂风中的少年 提交于 2019-11-27 02:17:35
问题 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 you do it in C++? Since i don't know the the exact Windows OS it could be XP,Vista or 7 and most importantly i don't know what the Username is. 回答1: For maximum compatibility with all versions of Windows, you can use the SHGetFolderPath function. It

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

為{幸葍}努か 提交于 2019-11-27 00:42:56
问题 On my system, %AppData% leads to ApplicationData which is C:\Users\<USER>\AppData\Roaming But there is also C:\Users\<USER>\AppData\Local And for some more confusion D:\Users\<USER>\AppData\LocalLow string local = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData); string roaming = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); My question is, to which of these locations should my application save its data? Are there guidelines for which of these

SHGetFolderPath() for a specific user

浪尽此生 提交于 2019-11-26 21:57:38
问题 I'm looking for a good way to get the local application data folder for a specific user -- without having to enter the login details for that user. SHGetFolderPath() can accept an access token for whatever user I want to get the local appdata folder for, but to get an access token, you have to provide the user's password. Also, according to the docs this isn't supported on <= Windows 2000. The registry key HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folder contains the

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

吃可爱长大的小学妹 提交于 2019-11-26 20:40:50
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 and Settings\user\Application Data". Look at combining Environment.GetFolderPath and Environment.SpecialFolder to do this. Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) Twelve47 Depending on what you are doing you might also want to look at Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) If the user

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

你离开我真会死。 提交于 2019-11-26 17:48:12
问题 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 that user's profile by logging in with the account, and turned on the option "Load User Profile" (was true by default anyway). Impersonation is turned off. Now I have the problem that %APPDATA% (in C#): appdataDir = Environment.GetFolderPath