• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Replacing Plist Files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Replacing Plist Files


  • Subject: Re: Replacing Plist Files
  • From: John Baltutis <email@hidden>
  • Date: Wed, 22 Feb 2006 13:34:43 -0800

On 02/22/06, email@hidden wrote:
>
> Can AppleScript be used to find and replace all copies of a plist file?  I
> would like to disable the option to open safe files after downloading in
> Safari.

AFAIK, AS could be used to find and delete the
~/Library/Preferences/com.apple.safari.plist files from each user's home
directory; however, it can't replace them. Only relaunching Safari can do that.
But, this is taking a sledge-hammer approach to the problem, since deleting the
plists reverts all settings back to their defaults. If you're trying to protect
users from the so-called worms floating about, then, IMHO, your solution will
just enrage the users when they find out that they lost their settings. A
better approach would be to change the specific setting in the plist files. Try
something like:

search each user's /Library/Preferences/ folder for the com.apple.safari.plist
file, collect those paths into a list, iterate on each, and execute this:

do shell script "defaults write <individual path to com.apple.safari plist
file> AutoOpenSafeDownloads 0"

Details are left as an exercise.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Replacing Plist Files
      • From: Malcolm Fitzgerald <email@hidden>
    • Re: Replacing Plist Files
      • From: Michelle Steiner <email@hidden>
  • Prev by Date: Re: Finding a decent Applescript reference/tutorial?
  • Next by Date: Re: Replacing Plist Files
  • Previous by thread: Replacing Plist Files
  • Next by thread: Re: Replacing Plist Files
  • Index(es):
    • Date
    • Thread