Re: Determining OS Version
Re: Determining OS Version
- Subject: Re: Determining OS Version
- From: Luther Fuller <email@hidden>
- Date: Sun, 24 Jan 2010 12:43:21 -0600
On Jan 24, 2010, at 11:56 AM, Marconi wrote: Where on a bootable volume is the best place to find out the version of OS that is installed? I want to make a droplet which, when a bootable volume is dropped onto it, will tell me:
APM | GUID OS version and PPC | Intel | Universal
You can do this ...
set diskAlias to (path to startup disk) -- or any other disk quoted form of (POSIX path of diskAlias) do shell script "bless --info " & the result
The resulting text will contain the line ...
"finderinfo[0]: 17805513 => Blessed System Folder is /System/Library/CoreServices
If the disk contains a bootable system.
The CoreServices folder contains a file named "SystemVersion.plist" which contains some of the information you need. Read this file using System Events. Set systemFile to an alias to the "SystemVersion.plist" file, then ...
tell application "System Events" to set systemRecord to (value of property list file ((systemFile as text)))
The record systemRecord contains your useful information.
But is this the "best place" to get this information? I don't know.
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden