Re: Why doesn't this script work?
Re: Why doesn't this script work?
- Subject: Re: Why doesn't this script work?
- From: Michelle Steiner <email@hidden>
- Date: Fri, 2 Nov 2007 17:13:19 -0700
On Nov 2, 2007, at 4:24 PM, Christopher Nebel wrote:
Permissions is a good guess, since at least on my system, that file
is only writable by root. Since System Events doesn't have a way to
authenticate file operations, the best I can suggest is to change
the permissions on the file -- 'do shell script "chmod a+w /System/
Library/LaunchDaemons/com.apple.backupd-auto.plist" with
administrator privileges' should do the trick.
That worked. How do I change it back, programatically, after writing
to it?
Beware that "property list item 4" is not reliable. Property list
items in a dictionary (such as this one is) are not in any
deterministic order, and may move if the file is changed. Referring
to them by name (e.g., 'property list item "StartInterval"') is a
much better way to go.
Understood, but that generated an error when I tried it. Curiously,
it doesn't generate one now (before changing permissions, that is).
After changing permissions, it works just fine.
-- Michelle
--
if u cn rd ths u cn gt a gd jb, bt if u rt lk ths u r a mrn.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden