Get the current OS version

This is a really simple task, and there are many ways to do it. With the release of 10.4 came new commands in the StandardAdditions that make most of the old methods unnecessary.

 

Usage...

Select one of the lines below and run it. Should return the OS version, such as '10.4.3'.

Code...

(* Method 1 - OS v10.4+ only *)
system version of (system info)

(* Method 2 - for OS versions prior to 10.4 *)
do shell script "sw_vers -productVersion"

Notes...

Check out the 'System Information' entry under 'Miscellaneous Commands' in the StandardAdditions dictionary to see all of the new options released in 10.4. You could also run "system info" to view a list of all the system info available.

 

 

Hosted by www.Geocities.ws

1