Is it possible to programmatically set a component value?

We would like to get the serial number of installed Office products from the registry and write it into the component detail for the system.

This can already be done manualy in zcc, but we would like to do this automatically using a script or something like that.