Open "About This Mac" window
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
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