FindPackages()FindPackages()FindPackages()FindPackages()

public : static IIterable<Package> FindPackages()public static IEnumerable<Package> FindPackages()Public Static Function FindPackages() As IEnumerable( Of Package )// This API is not available in Javascript.

If the method succeeds, an enumerable collection of package objects is returned. Each Package object in this collection contains information about the package, including but not limited to its name, publisher, version, and install location.

Remarks

This method requires the ID_CAP_OEM_DEPLOYMENT capability and is not intended to be used directly from your code.

If the method succeeds, an enumerable collection of package objects with the same package name and publisher name is returned. Each Package object in this collection contains information about the package, including but not limited to its name, publisher, version, and install location. If no packages with the specified name and publisher are found, this method returns an empty list.

Returns all the app packages with the same publisher ID as the app calling this method.

public : static IIterable<Package> FindPackagesForCurrentPublisher()public static IEnumerable<Package> FindPackagesForCurrentPublisher()Public Static Function FindPackagesForCurrentPublisher() As IEnumerable( Of Package )// This API is not available in Javascript.

A list of app packages with the same publisher ID as the app calling this method.

Examples

using Windows.ApplicationModel;
using Windows.Phone.Management.Deployment;
void DisplayApplicationInfo(string ProductId)
{
IEnumerable<Package> packages = InstallationManager.FindPackagesForCurrentPublisher();
// Loop over all installed applications looking for the specified ProductId
// (not the most efficient way to search, but a simple way to show how to use
// the functionality.
foreach (Package package in packages)
{
if (package.Id.ProductId.ToString().ToLower()== ProductId.ToLower())
{
// Dislay the title info in the ApplicationTitle textlock.
ApplicationTitle.Text = package.Id.Name;
// Retrieve the icon image by getting its DSS Token.
string token = package.GetThumbnailToken();
// Do something with image token.
}
}
}

You can also use this method to see if other apps from your publisher ID are installed on a phone. If they’re installed, you can launch them. To demonstrate, the following example enumerates all apps for the current publisher ID and launches the first app in the enumeration (unless that app happens to be the current app).

public : static IIterable<IAsyncOperationWithProgress<PackageInstallResult, unsigned int>> GetPendingPackageInstalls()public static IEnumerable<IAsyncOperationWithProgress> GetPendingPackageInstalls()Public Static Function GetPendingPackageInstalls() As IEnumerable( Of IAsyncOperationWithProgress )// This API is not available in Javascript.

The paths to the dependency packages. If there are no dependency packages or if the dependency packages are already registered, this parameter can be null. When DeploymentOptions is set to DevelopmentMode, leave this parameter null.

Removes a package for the current user asynchronously and receives progress and status messages on the removal operation. Dependency packages are also removed for the user if no other packages installed for the user depend on them.