Download ESSLoginItemEditor

ESSLoginItemEditor - manage login items easily

Manage login items with this class, which edits the user's loginwindow.plist file to implement its functionality

addLoginItem:shouldHideOnStart:
+ (BOOL)addLoginItem:(NSString *)pathToApp shouldHideOnStart:(BOOL)hideOrNot;
Add an application with path pathToApp to login items which hidesOrNot on launch.
Returns NO if existed already, YES if adding to login items succeeded.

removeLoginItemWithAppName:
+ (BOOL)removeLoginItemWithAppName:(NSString *)appName;
Removes all applications called appName from the login items.
Returns NO if it didn't work or there was no such item, YES if removed successfully.

removeLoginItem:
+ (BOOL)removeLoginItem:(NSString *)pathToApp;
Removes all applications with the path pathToApp from login items.
Returns NO if it didn't work or there was no such item, YES if removed successfully.

loginItems
+ (NSArray *)loginItems;
Returns an array of paths of all login items. If none, empty array is returned.

loginItemDicts
+ (NSArray *)loginItemDicts;
Returns an array of login items as they appear in the loginwindow.plist file.