Apple script rookie needs help on system info

Hi all,
I’d like to realize a kind of inventory using information based in app “System Information”.
Retrieve information in dashboard (like the friendly name of model) as well as those in the system report (display monitors, software etc.)
I’m not a novice on scripting program languages but not on apple language scripts and I need to go fast on this subject, so is someone can help me to understand how I can retrieve these informations and export them to a xml file, that would be great :cool:

tkx!

Fishbone.

Model: MacBook Pro (Retina, 15-inch, Mid 2015)
AppleScript: 2.4
Browser: Safari 600.8.9
Operating System: Mac OS X (10.10)

Hi,

try this, it uses the system_profiler shell command and creates a file ysteminformation.xml on desktop.
Other values for -detaillevel are basic and full.


do shell script "system_profiler -xml -detailLevel mini > ~/Desktop/systeminformation.xml"

Open Terminal.app and type man system_profiler to get information about other parameters.

Hi StefanK.

Yes, after my post I did some researches on web and I also seen articles which related system_profiler, that seems to be an interesting mine of information for inventory.

One last question, do you know how I can retrieve the model name as in the system information (“MacBook Pro (Retina, 15-inch, Mid 2015)” instead of model identifier “MacBookPro11,5”) using script ?

Anyway, thanks a lot for you reply. :slight_smile:

Regards,

Fishbone