Find Mac OSX version installed using AppleScript

前端 未结 7 2235
夕颜
夕颜 2021-02-15 04:23

How can I find which version of OSX is installed on my Mac by using AppleScript? I want to install an app programatically and run different pkg files based on the version.

7条回答
  •  梦如初夏
    2021-02-15 04:32

    This worked for me

    set OSVersion to system version (system info)
    if OSVersion as string < "10.9" or OSVersion as string > "10.9.5" then
    - Add code to execute if condition met
    else
    - Add code to execute if condition not met
    end if

提交回复
热议问题