Skip to content

Instantly share code, notes, and snippets.

@clburlison
Last active October 24, 2019 08:05

Revisions

  1. clburlison revised this gist Dec 18, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion get_sys_info.scpt
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    # https://macadmins.slack.com/archives/general/p1449604395017317
    # https://macadmins.slack.com/archives/general/p1449604450017318
    set a to do shell script "defaults read /System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist Version"
    tell application "Finder" to set b to get creation date of (POSIX file "/System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist" as alias)
    set s to short date string of b
  2. clburlison created this gist Dec 8, 2015.
    24 changes: 24 additions & 0 deletions get_sys_info.scpt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    # https://macadmins.slack.com/archives/general/p1449604395017317
    set a to do shell script "defaults read /System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist Version"
    tell application "Finder" to set b to get creation date of (POSIX file "/System/Library/CoreServices/XProtect.bundle/Contents/Resources/XProtect.meta.plist" as alias)
    set s to short date string of b
    set t to time string of b
    set c to do shell script "defaults read /private/var/db/gkopaque.bundle/Contents/version.plist CFBundleShortVersionString"
    tell application "Finder" to set d to get creation date of (POSIX file "/private/var/db/gkopaque.bundle/Contents/version.plist" as alias)
    set u to short date string of d
    set v to time string of d
    set e to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion"
    set f to do shell script "defaults read /System/Library/CoreServices/SystemVersion.plist ProductBuildVersion"
    set g to do shell script "defaults read /System/Library/Sandbox/Compatibility.bundle/Contents/version.plist CFBundleShortVersionString"
    tell application "Finder" to set h to get creation date of (POSIX file "/System/Library/Sandbox/Compatibility.bundle/Contents/version.plist" as alias)
    set w to short date string of h
    set x to time string of h
    set i to do shell script "defaults read /System/Library/CoreServices/MRT.app/Contents/version CFBundleShortVersionString"
    tell application "Finder" to set j to get creation date of (POSIX file "/System/Library/CoreServices/MRT.app/Contents/version.plist" as alias)
    set y to short date string of j
    set z to time string of j
    set k to do shell script "defaults read '/System/Library/Intelligent Suggestions/Assets.suggestionsassets/Contents/version.plist' CFBundleShortVersionString"
    tell application "Finder" to set l to get creation date of (POSIX file "/System/Library/Intelligent Suggestions/Assets.suggestionsassets/Contents/version.plist" as alias)
    set m to short date string of l
    set n to time string of l
    display dialog "XProtect " & tab & tab & a & tab & tab & s & tab & " " & t & return & "Gatekeeper " & tab & tab & c & tab & tab & tab & u & tab & " " & v & return & "SIP " & tab & tab & tab & tab & g & tab & tab & tab & w & tab & " " & x & return & "MRT " & tab & tab & tab & i & tab & tab & tab & y & tab & " " & z & return & "Core Suggest " & tab & k & tab & tab & tab & m & tab & " " & n & return & return & "OS X " & e & " (" & f & ")" buttons {"Close"} default button 1