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 13:06:57 +0000
This seems to work ok in case anyone wants it!
All the Best
Dave
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
--
-- Execute the Script
--
set myAppPath to "\"" & myAppPath & "\""
set myMediaToolPath to "\"" & myMediaToolPath & "\""
set myVolumePath to "\"" & myVolumePath & "\""
set myShellCommand to myMediaToolPath & " --volume " & myVolumePath & " --applicationpath " & myAppPath & " --nointeraction"
log myShellCommand
do shell script myShellCommand with administrator privileges
end tell
end run
> On 12 Dec 2015, at 12:34, Axel Luttgens <email@hidden> wrote:
>
> with admnistrator privileges
_______________________________________________
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