Change the title of the prompt for asking administrative privileges

Until Big Sur I was asking the administrative privileges using the command

/usr/bin/osascript -e 'do shell script "ls" with prompt "Installer is trying to setup" with administrator privileges'

which gives me this dialog box

Now the same command in mac os monetery is giving me the prompt with the title as "osascript".

How can I replace the osascript title with my app name. Thanks in advance

Replies

How can I replace the osascript title with my app name.

Can you explain more about your app? Is this an AppleScript app? Or an app written in some other language that runs the above-mentioned osascript command (for example, in Swift you can run osascript using Process)?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • No it is a nodejs application where we run osascript for some permission. Thanks

Add a Comment

No it is a nodejs application where we run osascript for some permission.

OK. Keep in mind that osascript was intended for folks writing shell scripts, not as an API for use by apps. If you want to run an AppleScript from your app, use the NSAppleScript API.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"