Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

delete the entry from loginwindow.plist using command




Hi Guys,

I successfully entered my application in loginwindow.plist through command line. But unable to delete that entry.

How to remove the my added entry  from loginwindow.plist from command line or shells script?

From net I found  one  script which remove the entry from  loginwindow.plist,but it remove whole entries from the plist.

The command is:

#!/bin/sh
theApp="your app"
nl=`echo "x" | tr 'x' '\34'` # what is the proper way to set ascii to a variable?
aaa=`defaults read loginwindow AutoLaunchedApplicationDictionary`
bbb=`echo -n "$aaa" | sed "s/^[()]$//;s/},/}$nl/" | tr '\n\34' '\00\n'| grep -va "$theApp" | tr '\n\00' ',\n' | sed 's/^,$//'`
defaults write loginwindow AutoLaunchedApplicationDictionary "($bbb)"

Waiting for helpful reply.

--
Thanks & Regards,

Sunil Prajapati
Software Developer in Macintosh
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/macnetworkprog/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.