• 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
One more thing...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

One more thing...


  • Subject: One more thing...
  • From: email@hidden
  • Date: Tue, 24 Aug 2010 15:05:25 -0500

Several months ago with the help of several posts here I developed this little script that gives general information about a Mac to aid a remote help support person. I have run into a little snag with some recent field testing and that is the script is looking specifically at en0 if you are using en1 you get the error: get if addr en0 failed (os/kern) failure.

What is the best way to check both ports or 0 and then 1 if there is no cable in 0 or all possible cards and then just reporting back what it finds? Thanks for all your help once again!

set macInfo to system info
set macName to computer name of macInfo
set ipAddress to do shell script "ipconfig getifaddr en0"
set userName to long user name of macInfo
set shortUserName to short user name of macInfo
set hostName to host name of macInfo
set userlocale to user locale of macInfo
set bootvolume to boot volume of macInfo
set homeDirectory to home directory of macInfo
set systemVersion to system version of macInfo
set primaryEthernetAddress to primary Ethernet address of macInfo
set CPUtype to CPU type of macInfo
set CPUspeed to CPU speed of macInfo
set Physicalmemory to physical memory of macInfo
set homeDirecory to home directory of macInfo
set networkInfo to do shell script "/usr/sbin/system_profiler" -- get network info
set AppleScript's text item delimiters to {"Domain Name:"}
try (* get rid of unavailable domain *)
        set macDomainName to paragraph 1 of text item 2 of networkInfo
on error
        set macDomainName to "unknown"
end try
set AppleScript's text item delimiters to {" "}

set userInfo to {}
set the end of userInfo to {"~HELP DESK INFORMATION~"}
set the end of userInfo to {"Computer Name:", macName} as text
set the end of userInfo to {"IP Address:", ipAddress} as text
set the end of userInfo to {"Network Domain:", macDomainName} as text
set the end of userInfo to {"User Name:", userName} as text
set the end of userInfo to {"Short User Name:", shortUserName} as text
set the end of userInfo to {"Host Name:", hostName} as text
set the end of userInfo to {"User Location:", userlocale} as text
set the end of userInfo to {"Boot Volume:", bootvolume} as text
set the end of userInfo to {"Home Directory:", homeDirectory} as text
set the end of userInfo to {"System Version:", systemVersion} as text
set the end of userInfo to {"MAC Address:", primaryEthernetAddress} as text
set the end of userInfo to {"CPU Type:", CPUtype} as text
set the end of userInfo to {"CPU Speed:", CPUspeed} as text
set the end of userInfo to {"Memory:", Physicalmemory} as text

set AppleScript's text item delimiters to return

set user_info to userInfo as text (* required to get rid of a confusion upon 'as *)
display alert user_info buttons {"Copy To Clipboard", "OK"} default button "OK"
if button returned of result = "Copy To Clipboard" then
        set the clipboard to user_info
end if


Jeffrey Madson / RR Donnelley Desktop Engineering






 _______________________________________________
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: One more thing...
      • From: email@hidden
    • Re: One more thing...
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: Sorting a list of records
  • Next by Date: Re: One more thing...
  • Previous by thread: Re: Sorting a list of records
  • Next by thread: Re: One more thing...
  • Index(es):
    • Date
    • Thread