diff --git a/doc/specs/#658 - WinGet Download.md b/doc/specs/#658 - WinGet Download.md index ab691cb563e..4162c35163c 100644 --- a/doc/specs/#658 - WinGet Download.md +++ b/doc/specs/#658 - WinGet Download.md @@ -20,8 +20,7 @@ This is inspired by customer feedback, and a need for broader application deploy ## Solution Design -[comment]: # Outline the design of the solution. Feel free to include ASCII-art diagrams, etc. -The Windows Package Manager will implement a new command `WinGet Download` that will offer customers with the ability to download their favorite package's installers. The new command will make use of the following optional parameter values: +The Windows Package Manager will implement a new command `WinGet Download` that will offer customers with the ability to download a single package's installers. The new command will make use of the following optional parameter values: * `--id ` * `--name ` * `--moniker ` @@ -40,7 +39,6 @@ The Windows Package Manager will implement a new command `WinGet Download` that * `--wait` * `--verbose, --verbose-logs` - An update to the existing schema is required for the inclusion of the ` isDownloadable` property. If this property is set to `True` or is not specified, then the package's installer will be considered downloadable. If the property is set to `False`, then the request to download the package's installer will be refused. Downloading the package's installer will still require that the package's installer hash be verified before becoming available to the user to interact with. The installer will be downloaded to the device with a `*.tmp` file extension that will be removed after the installer's hash has been validated. If the hash validation fails, the package's installer will be removed from the device. @@ -49,6 +47,7 @@ When downloading the package's installer, if a file with the same name exists th ## UI/UX Design +### WinGet Command Line Downloading an installer will output information relative to each step performed. Informing the user of any license agreements that must be accepted prior to download. Acceptance of license agreements will trigger the download to begin, displaying a progress bar that shows the download status. Upon download, the user will then be informed of the file hash validation status before being notified of the download status. The following is representative of the user experience. @@ -73,7 +72,7 @@ PS C:\> WinGet Download --help Windows Package Manager v1.1.1 Copyright (c) Microsoft Corporation. All rights reserved. -Downloads the selected package, either found by searching a configured source or directly from a manifest. By default, the query must case-insensitively match the id, name, or moniker of the package. Other fields can be used by passing their appropriate option. +Downloads an identified package's installer, either found by searching a configured source or directly from a manifest. By default, the query must case-insensitively match the id, name, or moniker of the package. Other fields can be used by passing their appropriate option. The following command alias are available @@ -110,7 +109,31 @@ Microsoft Visual Studio Code Microsoft.VisualStudioCode 1.75.0 Microsoft Visual Studio Code Insiders Microsoft.VisualStudioCode.Insiders 1.76.0 winget ``` -WinGet PowerShell cmdlet: +### WinGet Setting - Default Download Output + +A new setting will be included as the default output location for the user when package's installer is downloaded. + +```PS +PS C:\> winget settings export +{"$schema":"https://aka.ms/winget-settings-export.schema.json","adminSettings":{"BypassCertificatePinningForMicrosoftStore":false,"InstallerHashOverride":false,"LocalArchiveMalwareScanOverride":false,"LocalManifestFiles":false},"userSettingsFile":"C:\\Users\\Roy\\AppData\\Local\\Packages\\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\\LocalState\\settings.json","userDefaultAppOutput:"C:\\Users\\Roy\\Downloads\\"} +``` + +The following items will be included in the WinGet Settings Export Schema + +```PS +"network: { + "userDefaultAppOutput":"C:\\Users\\Roy\\Downloads\\" + "useMeteredNetwork":"False" +}" +``` + +The "userDefaultAppOutput" setting will be used as the default folder used for outputting the package's installer to. + +The "useMeteredNetwork" setting will accept boolean inputs, controlling the use of metered networks when downloading applications to the device. + + +### WinGet PowerShell Cmdlet +WinGet PowerShell cmdlet will download the identified package's installer based on the user specified parameters. While downloading the package's installer is occuring, PowerShell will show a progress bar displaying the progress. Afterwards, it will return an item object for the files downloaded.: ```PS PS C:\> Get-WinGetPackage Microsoft.VisualStudioCode @@ -125,6 +148,31 @@ Mode LastWriteTime Length Name ``` + +```PS +PS C:\> Get-Help Get-WinGetPackage + +NAME + Get-WinGetPackage + +SYNOPSIS + Gets a package's installer or all installers from a WinGet configured source. + +SYNTAX + Get-WinGetPackage [-ID ] [-Name ] [-Moniker ] + [-Scope ] [-Locale ] [-FileName ] + [-Version ] [-Source ] [-Architecture ] [-Exact] + [-Output ] [InstallerType ] [-IgnoreSecurityHash] + [-AcceptPackageAgreement] [-Wait] [-Verbose] + +DESCRIPTION + Downloads an identified package's installer, either found by searching a configured source or + directly from a manifest. By default, the query must case-insensitively match the id, name, or + moniker of the package. Other fields can be used by passing their appropriate option. + +``` + + ## Capabilities ### Accessibility @@ -137,7 +185,7 @@ Security of the Windows Package Manager should not be impacted by this change. ### Reliability -There will be no change to the reliability of the Windows Package Manager. The new functionality will offer improveed reliability for repetative installations of the same application across multiple devices. +There will be no change to the reliability of the Windows Package Manager. ### Compatibility @@ -154,7 +202,7 @@ There will be no breaking changes to the code. A subsection of the WinGet Instal ## Future considerations * Downloading of UWP applications with install type: msstore. -* PowerShell cmdlet for download automation +* AAD Authentication ## Resources