application data directory

Hey guys… I think I understood the supposed, recommended, and safest directory for putting application support files is SpecialFolder.ApplicationData… In my setup that would be C:\Users\Myname\AppData\Roaming

The question is, whatever I put there is only available for this particular user…right ? So where do I save “general preferences” (and other general supporting files for all users) ?

regards
Roman

specialFolder.SharedApplicationData

However be aware that on OS X this may no longer be possible, also Apple prefer you to use sub folders of this folder with the bundle id as the name of the folder.

App Wrapper has the bundle ID of “com.ohanaware.appWrapper3” so the folder used by it in the applicationData is “com.ohanaware.appWrapper3”.

i.e. OS X “~/Library/Application Support/com.ohanaware.appWrapper3”

I’m developing for windows right now… I’ll give it a try…thanks!

Just be aware that while anyone can read from sharedapplicationdata only administrators can write to that location.

You should create a folder for your application in this location and use icacls to set the permissions of that folder. Have a look at https://forum.xojo.com/16854-administrator-with-windows and https://technet.microsoft.com/en-us/library/cc753525(v=ws.11).aspx for more info.

geez… I don’t get it… which is the right directory to WRITE (and read) general preferences and config files of my app for ALL the users in one windows PC ?

thanks
R

Share Application Data is the correct place, you just have to set the environment up during setup. Check out the references.

cool. I was just reading that… thanks…

which is the right directory to WRITE (and read) general preferences <<

Is the HKCM registry a no-no these days?

HKLM requires UAC, while HKCU is ok. HKCM?

The usual way apps work, would that be on Windows or Mac, is that an app can be available to all users, but each user has its own preferences. Which makes a lot of sense. Like each driver has his own car seat settings :wink:

Actually I didn’t mean user preferences, but general initialization parameters…

a subdirectory in ApplicationData is a good place for application specific data like initialization parameters