• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Determining OS Version
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Determining OS Version


  • Subject: Re: Determining OS Version
  • From: Marconi <email@hidden>
  • Date: Mon, 25 Jan 2010 10:28:54 -0700

Title: Re: Determining OS Version
At 8:12 AM -0600 1/25/10, Luther Fuller sent email regarding Re: Determining OS Version:
Try this ...

on open dropList
        if (count items of dropList) > 1 then
                beep
                delay 1
                return
        end if
        set diskAlias to (item 1 of dropList) as alias
        tell application "Finder"
                if (class of item diskAlias) is not disk then
                        display dialog "That is not a disk." buttons {"OK"} default button 1
                        return
                end if
        end tell
       
        quoted form of (POSIX path of diskAlias)
        set response to do shell script "bless -info " & the result
        set AppleScript's text item delimiters to {"Blessed System Folder is "}
        try
                set response to text item 2 of response
        on error
                display dialog "This disk does not have an installed system." buttons {"OK"} default button 1
                return
        end try
        set AppleScript's text item delimiters to {return}
        set response to text item 1 of response
        set systemFile to ((POSIX file response) as alias as text) & "SystemVersion.plist"
       
        tell application "System Events" to set systemRecord to (value of property list file systemFile)
        set sysVersion to (ProductVersion of systemRecord)
        set buildNr to (ProductBuildVersion of systemRecord)
        display dialog "Mac OS version " & sysVersion & " (" & buildNr & ")" buttons {"OK"} default button 1
end open


This is certainly a step in the right direction but I get the error:

Can't get ProductVersion of {|ProductUserVisibleVersion|:"10.4.11",|ProductCopyright...}.

 _______________________________________________
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

  • Follow-Ups:
    • Re: Determining OS Version
      • From: Luther Fuller <email@hidden>
References: 
 >Re: Determining OS Version (From: John Baltutis <email@hidden>)
 >Re: Determining OS Version (From: Marconi <email@hidden>)
 >Re: Determining OS Version (From: Luther Fuller <email@hidden>)
 >Re: Determining OS Version (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Applescript and referring to a folder
  • Next by Date: Re: Determining OS Version
  • Previous by thread: Re: Determining OS Version
  • Next by thread: Re: Determining OS Version
  • Index(es):
    • Date
    • Thread