Dela via


PackageManager.FindPackage(String) Method

Definition

Retrieves information about the specified Package installed for any user.

public:
 virtual Package ^ FindPackage(Platform::String ^ packageFullName) = FindPackage;
/// [Windows.Foundation.Metadata.Overload("FindPackageByPackageFullName")]
Package FindPackage(winrt::hstring const& packageFullName);
[Windows.Foundation.Metadata.Overload("FindPackageByPackageFullName")]
public Package FindPackage(string packageFullName);
function findPackage(packageFullName)
Public Function FindPackage (packageFullName As String) As Package

Parameters

packageFullName
String

Platform::String

winrt::hstring

The full name of the package. This parameter cannot be null.

Returns

If this method succeeds it returns a package object that contains information about the specified package, including but not limited to its name, publisher, version, and install location. If the specified package is not found, this method returns null.

Attributes

Windows requirements

App capabilities
packageQuery

Remarks

This method requires administrative privileges. The returned package may be installed for the current user or for another user.

Applies to

See also