Having trouble with using administrator privileges in my droplet....
Having trouble with using administrator privileges in my droplet....
- Subject: Having trouble with using administrator privileges in my droplet....
- From: "OSullivan, Steven" <email@hidden>
- Date: Tue, 30 Jun 2009 14:55:58 -0700
- Thread-topic: Having trouble with using administrator privileges in my droplet....
Title: Having trouble with using administrator privileges in my droplet....
Hello there,
I am trying to write an AppleScript droplet that will accept a file dropped on it and do a chmod on it, and then cp the file to /usr/local/bin. I am trying to do this using Administrator Privileges, but I keep getting this error: "A privilege violation has occurred."
Here is my script so far:
on open theFile
tell application "Finder"
set theFile to POSIX path of theFile
-- display dialog "before chmod"
do shell script "chmod 333" & " " & quoted form of theFile with administrator privileges
-- display dialog "after chmod"
-- display dialog "before cp"
do shell script "cp" & " " & quoted form of theFile & "/usr/local/bin" with administrator privileges
-- display dialog "after cp"
return it
end tell
end open
Has anyone any suggestions as to where I am going wrong? I am a pretty much complete AS newb, and appreciate any and all assistance!
With thanks,
Steve O'Sullivan
_______________________________________________
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