Skip to content

Commit

Permalink
Update microsoft#658 - WinGet Download.md
Browse files Browse the repository at this point in the history
Updated the spec document
  • Loading branch information
RDMacLachlan committed Feb 11, 2023
1 parent 515bea5 commit 716b1df
Showing 1 changed file with 55 additions and 7 deletions.
62 changes: 55 additions & 7 deletions doc/specs/#658 - WinGet Download.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Identifier>`
* `--name <name>`
* `--moniker <moniker>`
Expand All @@ -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 `<boolean> 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.
Expand All @@ -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.
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 <System.String>] [-Name <System.String>] [-Moniker <System.String>]
[-Scope <System.String>] [-Locale <System.String>] [-FileName <System.String>]
[-Version <System.String>] [-Source <System.String>] [-Architecture <System.String>] [-Exact]
[-Output <System.String>] [InstallerType <System.String>] [-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
Expand All @@ -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

Expand All @@ -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

Expand Down

0 comments on commit 716b1df

Please sign in to comment.