PackageManager Class

Gère le logiciel disponible à un utilisateur.

Important  Vous ne pouvez pas utiliser cette classe dans une application Windows Store.

Syntaxe


public sealed class PackageManager

Attributs

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]

Membres

PackageManagerClasse possède ces types de membres :

Constructeurs

PackageManagerClasse possède ces constructeurs.

ConstructeurDescription
PackageManager Creates and initializes a new instance of the object.

 

Méthodes

The PackageManager Classe a les méthodes suivantes. Elle hérite également des méthodes de Object Classe.

MéthodeDescription
AddPackageAsync Adds a package (main package) and its dependencies for the current logged-in user.
CleanupPackageForUserAsync Cleans up a specified package for a specified user. Used to cleanup packages installed for a user after their user profile is deleted.
FindPackage Retrieves information about the specified package installed for any user.
FindPackageForUser Retrieves information about a specific package installed for a specific user or for all users.
FindPackages() Retrieves information about a specified family of packages installed across all users.
FindPackages(String) Retrieves information about a specified family of packages installed across all users.
FindPackages(String, String) Finds all installed packages with the specified name and publisher.
FindPackagesForUser(String) Finds all packages installed for the specified user.
FindPackagesForUser(String, String) Retrieves information about a specified family of packages installed for a specific user.
FindPackagesForUser(String, String, String) Retrieves information about all packages with the specified package name and publisher name, installed for a specific user.
FindPackagesForUserWithPackageTypes(String, PackageTypes) Finds packages of specific types that are installed for the specified user.
FindPackagesForUserWithPackageTypes(String, String, PackageTypes) Retrieves information about a specified family of packages and of specific types that are installed for the specified user.
FindPackagesForUserWithPackageTypes(String, String, String, PackageTypes) Retrieves information about packages of specific types with the specified package name and publisher name, installed for a specific user.
FindPackagesWithPackageTypes(PackageTypes) Retrieves information about specific package types that are installed across all users.
FindPackagesWithPackageTypes(String, PackageTypes) Retrieves information about a specified family of packages and specific package types that are installed across all users.
FindPackagesWithPackageTypes(String, String, PackageTypes) Finds all installed packages of specific types with the specified name and publisher.
FindUsers Finds the users who have installed the specified package.
RegisterPackageAsync Registers a package (the main package) and its dependency packages for the current user.
RegisterPackageByFullNameAsync Registers a package (the main package) by its full name and its dependency packages for the current user.
RemovePackageAsync(String) Removes a package for the current user asynchronously and receives progress and status messages on the removal operation.
RemovePackageAsync(String, RemovalOptions) Removes a package for the current user asynchronously and receives progress and status messages on the removal operation.
SetPackageState Sets the state of a package, for example, to usable, tampered with, and so on.
StagePackageAsync(Uri, IIterable(Uri)) Stages a package to the system without registering it.
StagePackageAsync(Uri, IIterable(Uri), DeploymentOptions) Stages a package to the system without registering it.
StageUserDataAsync Stages a package's user data to the system without registering it.
UpdatePackageAsync Updates an installed package or its dependency packages for the current user.

 

Conditions requises

Client minimal pris en charge

Windows 8 [applications de bureau uniquement]

Serveur minimal pris en charge

Windows Server 2012 [applications de bureau uniquement]

Espace de noms

Windows.Management.Deployment
Windows::Management::Deployment [C++]

Métadonnées

Windows.winmd

Voir aussi

Exemples
Ajoutez un exemple de package d'application
Exemple d'énumération de packages d'applications
Exemple d'énumération de packages d'applications par nom et éditeur
Énumérez les packages d'application par l'exemple SID de l'utilisateur
Exemple de suppression de package d'application
Concepts
Packages et déploiement d'applications
Référence
DeploymentResult
PackageUserInformation

 

 

Afficher:
© 2014 Microsoft