How to Get Package Information

Get information from your package fragment installer about the package being installed

If you need, in your package fragment installer, to get information about the package being installed such as its ID, full name or group name, make use of the InstallerContext property.

This property includes the read-only PackageInformation property and gives you access to information about the package.

Guid packageId = this.InstallerContext.PackageInformation.Id;
string packageName = this.InstallerContext.PackageInformation.Name;
string packageGroupName = this.InstallerContext.PackageInformation.GroupName;
Here the information you can get about the package being installed:

public sealed class PackageInformation
{
    public Guid Id { get; set; }
    public string Name { get; set; }
    public string GroupName { get; set; }
    public string Author { get; set; }
    public string Website { get; set; }
    public string Description { get; set; }
    public string Version { get; set; }
    public bool CanBeUninstalled { get; set; }
    public SystemLockingType SystemLockingType { get; set; }
    public bool FlushOnCompletion { get; set; }
    public bool ReloadConsoleOnCompletion { get; set; }
    public Version MaxCompositeVersionSupported { get; set; }
    public Version MinCompositeVersionSupported { get; set; }
}
The names of the properties are self-explanatory.