Redagować

Udostępnij przez


PackagePathType enumeration (appmodel.h)

Indicates the type of folder path to retrieve in a query for the path or other info about a package.

Syntax

typedef enum PackagePathType {
  PackagePathType_Install,
  PackagePathType_Mutable,
  PackagePathType_Effective,
  PackagePathType_MachineExternal,
  PackagePathType_UserExternal,
  PackagePathType_EffectiveExternal
} ;

Constants

 
PackagePathType_Install
Retrieve the package's install path.
PackagePathType_Mutable
If the package has a Mutable location, then retrieve the package's Mutable path.
PackagePathType_Effective
Specifies that the package path should be retrieved according to the following logic:

* If the package has a User-External location, then return that path.
* Otherwise, if the package has a Machine-External location, then return that path.
* Otherwise, if the package has a Mutable location, then return the Mutable path. Also see Create a directory in any location based on packaged app directory.
* Otherwise, return the package's Install path.
PackagePathType_MachineExternal
Specifies that the package path should be retrieved according to the following logic:

* If the package has a Machine-External location, then return that path.
* Otherwise, return an error.
PackagePathType_UserExternal
Specifies that the package path should be retrieved according to the following logic:

* If the package has a User-External location, then return that path.
* Otherwise, return an error.
PackagePathType_EffectiveExternal
Specifies that the package path should be retrieved according to the following logic:

* If the package has a User-External location, then return that path.
* Otherwise, if the package has a Machine-External location, then return that path.
* Otherwise, return an error.

Remarks

An application has a mutable install folder if it uses the windows.mutablePackageDirectories extension in its package manifest. This extension specifies a folder under the %ProgramFiles%\ModifiableWindowsApps path where the contents of the application's install folder are projected so that users can modify the installation files.

Important

This feature requires the modifiableApp restricted capability. Microsoft Store policy requires packages with that capability to be certain types of desktop PC games that are published by Microsoft and its partners.

A package always has an Install location. A package can also have a Mutable, Machine External and/or User External location.

The concept of "effective" is the location that has the highest precedence for the package/user.

Requirements

Requirement Value
Minimum supported client Windows 10 [desktop apps only]
Minimum supported server Windows Server 2016 [desktop apps only]
Header appmodel.h

See also