Hi
I wrote following code. Also, I have created com.p1.myapp.plist from
admin user at /Library/Preferences and has 666 permission.
SInt kColor = 5;
const CFStringRef kAppName = CFSTR("com.p1.myapp");
const CFStringRef kPrefColor = CFSTR("color");
CFNumberRef value = CFNumberCreate(NULL, kCFNumberSInt8Type, &kColor);
CFPreferencesSetValue( kPrefColor, value, kAppName,
kCFPreferencesAnyUser, kCFPreferencesCurrentHost);
CFPreferencesAppSynchronize(kAppName); // this will fail ,return
false in Non- admin
above code is working in Tiger Non-Admin but failed in Leopard Non-
Admin
Is there any change ?
My target is to change preferences for Any user(/Library/Preferences/)
from non-admin account , How can i achieve this ?
p2


|