random complaint re: Apple System Profiler
random complaint re: Apple System Profiler
- Subject: random complaint re: Apple System Profiler
- From: David Reynolds <email@hidden>
- Date: Fri, 16 Feb 2001 02:24:47 -0800
So I get this opportunity. It with a major shoe company (not Nike!) and
they've got a smallish office with 80 Macs. I want the gig (I'm a
free-lance consultant) so one of the first things I wanna propose is an
inventory. I figger 'hey Apple System Profiler will give me all the data I
need, and it's scriptable!'
Now the bad news (what follows is what I posted on the AppleScript
discussion forum on Apple's site. I have yet to receive a response):
--
It appears that even in Mac OS 9.1, some of the scriptability of System
Profiler is broken/mis-featured. IIRC, I saw this first back under OS 8.5,
but I'm not certain, nor do I have any 8.5 systems handy to test on.
I'm trying to write a script that will parse a slew of ASP reports for
auto-entry into a database. In ASP's dictionary in the report class there
are several properties that are records containing data from various
sections of the System info panel of the ASP reports. Unfortunately, when
called they appear to return data about the current system where the script
is running, not the processed report data.
Here's some example data from the event log:
tell application "Apple System Profiler"
get system info of report 1
--> {file sharing:true, finder version:"9.1", system version:"9.1 US",
active enabler:"", At Ease version:"1.3.1", QuickTime version:"5.0a19",
CarbonLib version:"1.2", Startup DiskName:"Lucifer", Startup DiskType:"Hard
drive", Startup Disk Location:"ID = 0", Startup Disk Bus:"SCSI Bus 0"}
get Startup DiskName of report 1 --> "Macintosh HD"
notice that the Startup DiskName of record system info is "Lucifer", but
when queried directly (not in this record format), Startup DiskName reports
the name "Macintosh HD". Both of these statements were directed at report 1,
so I would assume that Startup DiskName should hold the same value in both
instances.
The second of these behaviors is correct. The above example also applies to
the record properties memory info, hardware info, network info and
production info.
Also, I'm a little stymied in that I'd like to grab all of the remaining
info in a report through AppleScript, but it looks like the dictionary
doesn't provide support for info on Extensions, Control Panels, Devices &
Volumes, etc. Instead, I suspect I'll have to parse the reports as text,
which is something I really don't want to do.
Rather than querying each property directly, does anyone know of a
workaround for this, or have any other ideas?
--
Anyone else have this problem? Know a workaround? I' submitted this to the
Bug Tracker, but I haven't seen any action there, eother.
--
David Reynolds
<email@hidden>