function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
gaurav.sfdcgaurav.sfdc 

Installation User of managed Package?

Normally we get ghost user when we installed a managed package, Is there a way I can get the name/profile of the logged-in user who installed the package? I have checked some articles which says that there are some package properties as 'Installed By' or 'Created By' . But how to access these in Apex. 
What I want is : I want to enable certain parts of my application which is either accessible by Admin-profile or by the user who istalled the package?

 
ShashankShashank (Salesforce Developers) 
You may have to use the metadata API in apex to get the necessary details of the package.

These links may help in understanding how to do it:
http://salesforce.stackexchange.com/questions/13561/how-to-get-a-list-of-the-managed-packages-including-version-numbers-installed
http://andyinthecloud.com/2013/10/27/introduction-to-calling-the-metadata-api-from-apex/
gaurav.sfdcgaurav.sfdc
This gives following error


Error: Compile Error: Invalid type: MetadataService.MetadataPort