If you are looking to programmatically work with GP objects, then you will want to look at Microsoft's IGPMGPO interface.
The catch here is you can't create new policy settings within the GPO, but you can modify the GPO itself (copy GPOs, enable/disable setting groups, set WMI filters, modify ACLs, etc). So if you create a GPO that will do the install by hand, you could use this interface to modify your permissions or filters to expand the targeting. But to my knowledge there isn't an available interface for modifying the properties of settings within a GPO.
At this point you're getting into an area of programming that I don't work with, so I can't offer any of my own examples. But the link takes you to the MSDN reference material, and I figure anyone confident enough to say "any language will do" is probably capable of reading the docs and getting an idea of it.
But, for someone else's work, I found this on MSDN Social (near top of Google when searching IGPMGPO)
EDIT :: I just had a co-worker point out that the GP Objects are just collections (folders) of files written to \\domain\SYSVOL\domain\Policies\GUID and that you could, if you wanted to, use the interface above to fill in that path then write any property changes directly to the GPO underlying storage. At the end you'd go back to the above interface and toggle a setting (computer enable/disable, for example) to update the version stamp in the database and cause the new settings to be read from storage and pushed down. I've never done this and he emphasized the "could, but I wouldn't" aspect.