3

How can I display About This Mac window?

I know that it is managed by the loginwindow process so I tried to open in applescript(I'm still a beginner).

tell application "System Events" to tell process "loginwindow"
    open window "About This Mac"
end tell

The code keeps on running. It neither stops nor displays window nor shows any error. Is it even right command?

So, how can I open About This Mac window?

The solution is not limited to applescript. Is there a way to open it from terminal?

4

I don't know about the applescript but I know how to do it terminal.

Use open command in the Terminal to open About This Mac window.

open -a "About This Mac"
  • The application /System/Library/CoreServices/Applications/About This Mac.app is only available on macOS Sierra, so your answer fails on versions of OS X prior to macOS Sierra. – user3439894 Mar 20 '17 at 13:36
  • @user3439894 I too just realised. Is there any way to open it prior macOS Sierra then? – SkrewEverything Mar 20 '17 at 13:44
  • @SkrewEverything, If one is running macOS Sierra, then your answer if fine. – user3439894 Mar 20 '17 at 13:50
4

The application /System/Library/CoreServices/Applications/About This Mac.app is only available on macOS Sierra, so SkrewEverything's answer fails on versions of OS X prior to macOS Sierra.

Here is an example of AppleScript code to open "About This Mac" via UI Scripting:

tell application "System Events" to click menu item "About This Mac" of menu 1 of menu bar item "Apple" of menu bar 1 of application process "Finder"

The above AppleScript command can be executed in Terminal using osascript as in the example below:

osascript -e 'tell application "System Events" to click menu item "About This Mac" of menu 1 of menu bar item "Apple" of menu bar 1 of application process "Finder"'

Note that when using UI Scripting, the calling application will need to be given permission for assistive access by adding the target app to, e.g.: System Preferences > Security & Privacy > Privacy > Accessibility

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .