• 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: How to Run a "sudo" Terminal Command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to Run a "sudo" Terminal Command


  • Subject: Re: How to Run a "sudo" Terminal Command
  • From: Dave <email@hidden>
  • Date: Sat, 12 Dec 2015 12:49:10 +0000

> On 12 Dec 2015, at 12:34, Axel Luttgens <email@hidden> wrote:
>
> with admnistrator privileges

when I try this command:

		do shell script myShellCommand with admnistrator privileges

I get an error in Script Editor on the word “privileges”, I tried it without the word “privileges” but get an error, not sure if its because of this or something else?

Here is whole Script, I just want to automate building Mac OS X Emergency Install Disks.

on run
	tell application "Finder"
		--
		--  Setup Source App
		--
		set myApp to choose application with prompt "Select the Installer Application" as alias
		set myAppPath to POSIX path of myApp

		--
		--  Setup Install Media Tool Path
		--
		set myMediaToolPath to myAppPath & "Contents/Resources/createinstallmedia"

		--
		--  Setup Destination Volume
		--
		set myVolumeList to list disks
		set myVolume to choose from list myVolumeList with prompt "Select Destination Volume"
		set myVolumePath to "/Volumes/" & myVolume

		set myShellCommand to myMediaToolPath & " " & "--volume " & myVolumePath & "--applicationpath " & myAppPath -- & "--nointeraction"
		do shell script myShellCommand with admnistrator

	end tell
end run

I think maybe I need to do something special with spaces in the file/folder paths?

Thanks a lot for any help on this.

All the Best
Dave





 _______________________________________________
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: How to Run a "sudo" Terminal Command
      • From: Axel Luttgens <email@hidden>
    • RE: How to Run a "sudo" Terminal Command
      • From: "Jacopille, David" <email@hidden>
    • Re: How to Run a "sudo" Terminal Command
      • From: Axel Luttgens <email@hidden>
References: 
 >How to Run a "sudo" Terminal Command (From: Dave <email@hidden>)
 >Re: How to Run a "sudo" Terminal Command (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: How to Run a "sudo" Terminal Command
  • Next by Date: Re: How to Run a "sudo" Terminal Command
  • Previous by thread: Re: How to Run a "sudo" Terminal Command
  • Next by thread: Re: How to Run a "sudo" Terminal Command
  • Index(es):
    • Date
    • Thread