1

I did the following and it works fine, I added my Command Line Tool to the Resource Folder of my project and did the following below:

set myPath to POSIX path of (path to resource "MyComandLineTool") do shell script "cp " & quoted form of POSIX path of myPath & space & "/private/tmp" with administrator privileges set cmd to "/private/tmp/myPath -r" do shell script " " & cmd with administrator privileges

I wanted to know how not to pass it to /private/tmp, just run it from within the Resources folder of my project.

1 Answer 1

1

It's quite similar, just omit the copying part

set myPath to quoted form of (POSIX path of (path to resource "MyComandLineTool"))
do shell script myPath & " -r" with administrator privileges

Note: quoted form of is always good practice as the path could contain space characters

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks for your help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.