Re: location of user-defaults
Re: location of user-defaults
- Subject: Re: location of user-defaults
- From: Dave Thorup <email@hidden>
- Date: Mon, 16 Jun 2003 15:09:00 -0600
On 6/16/03 1:07 PM, "Rhon Fitzwater" <email@hidden> wrote:
>
Is it possible to change the location of where the defaults are stored?
>
Right now every user is getting an individual preference file that is
>
stored in their home directory. I want to make it so my software prefs
>
can only be changed by an admin user. So storing its prefs in
>
/Library/Preferences is where I want the defaults to be stored. This
>
way a user with non-admin privileges cannot modify the prefs.
>
>
If this is possible can someone give me some info on where to start,
>
maybe sites with example code, or documents, etc.
You can't do this with NSUserDefaults, however you can use the CFPreferences
API (Core Foundation). Note that this does not involve changing the
location of where the defaults are stored, you are simply _using_ a
different defaults domain. You can find information on the CFPreferences
API here:
http://developer.apple.com/techpubs/macosx/CoreFoundation/ProgrammingTopics/
CFPreferences/index.html
____________________________________
Dave Thorup
Software Engineer
email@hidden
www.kuwan.net
Defaults Manager - The premier editor for Mac OS X's User Defaults /
Preferences database.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.