Thursday, March 6, 2008

Getting object contents for SoftwarePackages

There are many various commands to get properties of objects, but for
some reason the ones I want never seem to be one of these "w" commands.
With the use of objcall and idlcall you can get the attributes of the
SoftwarePackage objects

First you need to get the object id of the resouce
wlookup -r SoftwarePackage:
returns: 1866920934.1.1220#SoftwarePackage::Spo#

Then use this oid with objcall
objcall 1866920934.1.1220#SoftwarePackage::Spo# contents
this will return all of the available attributes for the object

Then use idlcall to get a specific attribute. Just use "_get_" followed
by the attribute.
idlcall 1866920934.1.1220#SoftwarePackage::Spo# _get_description
returns: ""

This does seem to also work for some other objects, but not all. Just
be careful if you decide to try "set". I would really recommend against
this unless you really know what you are doing.

Have fun!

Martin

No comments: