Re: Installing a new login item? - Code that works!
Re: Installing a new login item? - Code that works!
- Subject: Re: Installing a new login item? - Code that works!
- From: Isaac Sherman <email@hidden>
- Date: Thu, 04 Jul 2002 18:05:43 -0400
on 7/3/02 10:13 AM, the method -(id)email@hidden:(id)
sender:@"Pierre-Olivier Latour"; returned:
>
******** Code that works fine *******
>
>
NSMutableArray* loginItems;
>
>
loginItems = (NSMutableArray*) CFPreferencesCopyValue((CFStringRef)
>
@"AutoLaunchedApplicationDictionary", (CFStringRef) @"loginwindow",
>
kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
>
loginItems = [[loginItems autorelease] mutableCopy];
>
>
//Do you stuff on "loginItems" array here
>
>
CFPreferencesSetValue((CFStringRef)
>
@"AutoLaunchedApplicationDictionary", loginItems, (CFStringRef)
>
@"loginwindow", kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
>
CFPreferencesSynchronize((CFStringRef) @"loginwindow",
>
kCFPreferencesCurrentUser, kCFPreferencesAnyHost);
>
>
[loginItems release];
>
That works great(Not to be redundant)! Thanks,
--
Isaac Sherman
MotaSoft Software
http://homepage.mac.com/huperzoevs/
_______________________________________________
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.