• 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
Having trouble with using administrator privileges in my droplet....
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Having trouble with using administrator privileges in my droplet....
      • From: James Nierodzik <email@hidden>
    • Re: Having trouble with using administrator privileges in my droplet....
      • From: Steve Thompson <email@hidden>
  • Prev by Date: Re: A simple script for FileMaker Pro
  • Next by Date: Re: Having trouble with using administrator privileges in my droplet....
  • Previous by thread: Re: A simple script for FileMaker Pro
  • Next by thread: Re: Having trouble with using administrator privileges in my droplet....
  • Index(es):
    • Date
    • Thread