I believe this is currently not possible in Apex. It would be possible to do this using Metadata API. For your reference, this might throw some light on it: http://salesforce.stackexchange.com/questions/13561/how-to-get-a-list-of-the-managed-packages-including-version-numbers-installed
I believe this is currently not possible in Apex. It would be possible to do this using Metadata API.
For your reference, this might throw some light on it:
http://salesforce.stackexchange.com/questions/13561/how-to-get-a-list-of-the-managed-packages-including-version-numbers-installed