1

I want to get the list of installed uwp application in the desktop.I want to make it within uwp application.Is there any way to achieve this?

4
  • 3
    Have look at similar question. stackoverflow.com/questions/15448832/…
    – Rudra
    Dec 15, 2016 at 9:11
  • Ya It's getting list of installed package bt while uploading to store it's shows error as "Remove Restricted Capabilities"
    – Vishnu s
    Dec 29, 2016 at 3:31
  • I want to get list of installed Win32 Application in the System.Is it possible to achieve it in UWP?
    – Vishnu s
    Dec 29, 2016 at 3:34
  • Please follow the steps below Important section in Special and restricted capabilities to request access to a restricted capability before submitting your app to the store. And for a UWP store app, it can't get list of installed Win32 application.
    – Jay Zuo
    Dec 29, 2016 at 9:43

1 Answer 1

4

We can use PackageManager.FindPackagesForUser(String) method to find all packages installed for for the current user in UWP apps like following:

PackageManager packageManager = new PackageManager();

IEnumerable<Windows.ApplicationModel.Package> packages = packageManager.FindPackagesForUser("");

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

But please note that To use this method in a UWP app, we need to declare restricted capability packageQuery in app's package manifest.

<Package
  xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
  xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
  xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
  xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
  IgnorableNamespaces="uap mp rescap">

  ...

  <Capabilities>
    <Capability Name="internetClient" />
    <rescap:Capability Name="packageQuery" />
  </Capabilities>
</Package>

For more info, please see Special and restricted capabilities.

1
  • 1
    Is there any way to get installed win32 applications in the UWP?
    – Vishnu s
    Jan 23, 2017 at 5:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.