pub struct Installer {Show 39 fields
pub locale: Option<LanguageTag>,
pub platform: Platform,
pub minimum_os_version: Option<MinimumOSVersion>,
pub architecture: Architecture,
pub type: Option<InstallerType>,
pub nested_installer_type: Option<NestedInstallerType>,
pub nested_installer_files: BTreeSet<NestedInstallerFiles>,
pub scope: Option<Scope>,
pub url: DecodedUrl,
pub sha_256: Sha256String,
pub signature_sha_256: Option<Sha256String>,
pub install_modes: InstallModes,
pub switches: InstallerSwitches,
pub success_codes: BTreeSet<InstallerSuccessCode>,
pub expected_return_codes: BTreeSet<ExpectedReturnCodes>,
pub upgrade_behavior: Option<UpgradeBehavior>,
pub commands: BTreeSet<Command>,
pub protocols: BTreeSet<Protocol>,
pub file_extensions: BTreeSet<FileExtension>,
pub dependencies: Dependencies,
pub package_family_name: Option<PackageFamilyName<'static>>,
pub product_code: Option<String>,
pub capabilities: BTreeSet<Capability>,
pub restricted_capabilities: BTreeSet<RestrictedCapability>,
pub markets: Option<Markets>,
pub aborts_terminal: bool,
pub release_date: Option<CompactString>,
pub install_location_required: bool,
pub require_explicit_upgrade: bool,
pub display_install_warnings: bool,
pub unsupported_os_architectures: UnsupportedOSArchitecture,
pub unsupported_arguments: UnsupportedArguments,
pub apps_and_features_entries: AppsAndFeaturesEntries,
pub elevation_requirement: Option<ElevationRequirement>,
pub installation_metadata: InstallationMetadata,
pub download_command_prohibited: bool,
pub repair_behavior: Option<RepairBehavior>,
pub archive_binaries_depend_on_path: bool,
pub authentication: Option<Authentication>,
}Fields§
§locale: Option<LanguageTag>The locale for an installer not the package meta-data.
Some installers are compiled with locale or language specific properties. If this key is present, it is used to represent the package locale for an installer.
platform: PlatformThe Windows platform targeted by the installer.
The Windows Package Manager currently supports “Windows.Desktop” and “Windows.Universal”.
minimum_os_version: Option<MinimumOSVersion>The minimum version of the Windows operating system supported by the package.
architecture: ArchitectureThe hardware architecture targeted by the installer.
The Windows Package Manager will attempt to determine the best architecture to use. If emulation is available and the native hardware architecture does not have a supported installer, the emulated architecture may be used.
type: Option<InstallerType>The installer type for the package.
The Windows Package Manager supports MSIX, MSI, and executable installers. Some well known formats (Inno, Nullsoft, WiX, and Burn) provide standard sets of installer switches to provide different installer experiences. Portable packages are supported as of Windows Package Manager 1.3. Zip packages are supported as of Windows Package Manager 1.5.
nested_installer_type: Option<NestedInstallerType>The installer type of the file within the archive which will be used as the installer.
nested_installer_files: BTreeSet<NestedInstallerFiles>A list of all the installers to be executed within an archive.
scope: Option<Scope>The scope the package is installed under.
The two configurations are user and machine. Some installers support only one of
these scopes while others support both via arguments passed to the installer using
InstallerSwitches.
url: DecodedUrlThe URL to download the installer.
sha_256: Sha256StringThe SHA 256 hash for the installer. It is used to confirm the installer has not been modified. The Windows Package Manager will compare the hash in the manifest with the calculated hash of the installer after it has been downloaded.
signature_sha_256: Option<Sha256String>The signature file (AppxSignature.p7x) inside an MSIX installer. It is used to provide streaming install for MSIX packages.
install_modes: InstallModesThe install modes supported by the installer.
The Microsoft community package repository requires a package support “silent” and “silent with progress”. The Windows Package Manager also supports “interactive” installers.
switches: InstallerSwitchesThe set of switches passed to installers.
success_codes: BTreeSet<InstallerSuccessCode>Any status codes returned by the installer representing a success condition other than zero.
expected_return_codes: BTreeSet<ExpectedReturnCodes>Any status codes returned by the installer representing a condition other than zero.
upgrade_behavior: Option<UpgradeBehavior>What the Windows Package Manager should do regarding the currently installed package during a package upgrade.
If the package should be uninstalled first, the uninstallPrevious value should be
specified. If the package should not be upgraded through WinGet, the deny value should
be specified.
commands: BTreeSet<Command>Any commands or aliases used to execute the package after it has been installed.
protocols: BTreeSet<Protocol>Any protocols (i.e. URI schemes) supported by the package. For example: ["ftp", "ldap"].
Entries shouldn’t have trailing colons. The Windows Package Manager does not support any
behavior related to protocols handled by a package.
file_extensions: BTreeSet<FileExtension>Any file extensions supported by the package.
For example: ["html", "jpg"]. Entries shouldn’t have leading dots. The Windows Package
Manager does not support any behavior related to the file extensions supported by the
package.
dependencies: DependenciesAny dependencies required to install or run the package.
package_family_name: Option<PackageFamilyName<'static>>The package family name specified in an MSIX installer.
This value is used to assist with matching packages from a source to the program installed in Windows via Add / Remove Programs for list, and upgrade behavior.
product_code: Option<String>The product code.
This value is used to assist with matching packages from a source to the program installed in Windows via Add / Remove Programs for list, and upgrade behavior.
capabilities: BTreeSet<Capability>The capabilities provided by an MSIX package.
More information is available for App capability declarations.
restricted_capabilities: BTreeSet<RestrictedCapability>The restricted capabilities provided by an MSIX package.
More information is available for App capability declarations.
markets: Option<Markets>Any markets a package may or may not be installed in.
aborts_terminal: boolThe behavior associated with installers that abort the terminal.
This most often occurs when a user is performing an upgrade of the running terminal.
release_date: Option<CompactString>The release date for a package, in RFC 3339 / ISO 8601 format, i.e. “YYYY-MM-DD”.
install_location_required: boolThe requirement to have an install location specified.
These installers are known to deploy files to the location the installer is executed in.
require_explicit_upgrade: boolIdentifies packages that upgrade themselves.
By default, they are excluded from winget upgrade --all.
display_install_warnings: boolWhether a warning message is displayed to the user prior to install or upgrade if the package is known to interfere with any running applications.
unsupported_os_architectures: UnsupportedOSArchitectureAny architectures a package is known not to be compatible with.
Generally, this is associated with emulation modes.
unsupported_arguments: UnsupportedArgumentsThe list of Windows Package Manager Client arguments the installer does not support.
Only the --log and --location arguments can be specified as unsupported arguments for an
installer.
apps_and_features_entries: AppsAndFeaturesEntriesThe values reported by Windows Apps & Features.
When a package is installed, entries are made into the Windows Registry.
elevation_requirement: Option<ElevationRequirement>The scope in which scope a package is required to be executed under.
Some packages require user level execution while others require administrative level execution.
installation_metadata: InstallationMetadataAllows for additional metadata to be used for deeper installation detection.
download_command_prohibited: boolWhen true, this flag will prohibit the manifest from being downloaded for offline installation with the winget download command.
repair_behavior: Option<RepairBehavior>This field controls what method is used to repair existing installations of packages.
Specifying modify will use the ModifyPath string from the package’s ARP data,
uninstaller will use the Uninstall string from the package’s ARP data, and installer
will download and run the installer. In each case, the Repair value from
InstallerSwitches will be added as an argument when invoking the command to repair the
package.
archive_binaries_depend_on_path: boolThis field controls the behavior of environment variables when installing portable packages
from an archive (i.e. zip).
Specifying true will add the install location directly to the PATH environment variable.
Specifying false will use the default behavior of adding a symlink to the links folder,
if supported, or adding the install location directly to PATH if symlinks are not
supported.
authentication: Option<Authentication>This field controls the authentication for Entra ID secured private sources.
Resource and scope information can be included if a specific resource is needed to download or install the package.
Implementations§
Source§impl Installer
impl Installer
Sourcepub fn merge_with(self, other: Self) -> Self
pub fn merge_with(self, other: Self) -> Self
Merges two installers.
If a key of self is equal to its default, it will take the value from other. If the key
of self is not equal to its default, it will retain that value and the equivalent key in
other is ignored.
Trait Implementations§
Source§impl Ord for Installer
impl Ord for Installer
Source§impl PartialOrd for Installer
impl PartialOrd for Installer
impl Eq for Installer
impl StructuralPartialEq for Installer
Auto Trait Implementations§
impl Freeze for Installer
impl RefUnwindSafe for Installer
impl Send for Installer
impl Sync for Installer
impl Unpin for Installer
impl UnwindSafe for Installer
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more