Re: How to Run a "sudo" Terminal Command
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