views:

15

answers:

1

Hi,

In Mac, I want to remove an application from the login items using Shell script.

I tried following code, but didn't work..

   defaults write loginwindow  AutoLaunchedApplicationDictionary -array-remove path "/Applications/myApp.app"

But it is giving error "Unexpected argument -path; leaving defaults unchanged"

Regards, Dhanaraj

A: 

Try:

defaults write /Library/Preferences/loginwindow AutoLaunchedApplicationDictionary -array-remove { "Path" = "/Applications/myApp.app" }

For more info check out this link: http://mattdanger.net/tag/mac-os-x/

Paul R