Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Common AppData issues
Message
 
À
03/03/2015 07:15:30
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01616136
Message ID:
01616169
Vues:
58
>>I have an issue with the common App Data folder which I get using SHGetSpecialFolderPath.
>>The path is something like C:\ProgramData\My Company\Project Name\. The problem is the program creates a preferences file to store local settings, but when running the program the first time, we run it as administrator in order to let it install some additional resources. So whenever we run the program subsequently without admin right, the error occurs "File access denied", because it would not allow writing to this location or replacing the file.
>>
>>Is this the correct place to store local application data, or would be it better to place it into the temp folder? I haven't used the temp folder for the reason that it can get cleaned up, although I could live with it if there is no better way.
>
>I have successfully used c:\users\public\MyApplicationName, where MyApplicationName is the name of my application, for this kind of common configuration storage. Another option is to use the registry.

This is one thing that's such a huge pain in the ass in Windows - making sense of where things are stored :-)

I've summarized this as:

ProgramData is for global application configuration that can be applied to all users. Essentially all users have full rights in this folder.

AppData is for user specific application configuration data. Typically used for configuration data or data that an application implicitly uses - usually for config or data storage.

Documents folders are for user accessible data that they open and edit explicitly. IE. documents in document centric applications or user configurable data files if they can open many files.
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform