Skip to content

Commit

Permalink
Update microsoft#658 - WinGet Download.md
Browse files Browse the repository at this point in the history
  • Loading branch information
RDMacLachlan committed Feb 11, 2023
1 parent 2b9fd33 commit 515bea5
Showing 1 changed file with 26 additions and 14 deletions.
40 changes: 26 additions & 14 deletions doc/specs/#658 - WinGet Download.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,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 application 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 their favorite package's installers. The new command will make use of the following optional parameter values:
* `--id <Identifier>`
* `--name <name>`
* `--moniker <moniker>`
Expand All @@ -32,22 +32,20 @@ The Windows Package Manager will implement a new command `WinGet Download` that
* `-s, --source <Source>`
* `-a, --architecture <architecture>`
* `-e, --exact`
* `-o, -log <path>`
* `-p, --path <path>`
* `--installer-type <type>`
* `-o, --output <path>`
* `-t, --type <installer type>`
* `--ignore-security-hash`
* `--accept-package-agreements`
* `--filename <name>`
* `--help`
* `--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 application installer will be considered downloadable. If the property is set to `False`, then the request to download the application installer will be refused.
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 application installer will still require that the application 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 application installer will be removed from the device.
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.

When downloading the application installer, if a file with the same name exists the new download will overwrite the existing file.
When downloading the package's installer, if a file with the same name exists the new download will overwrite the existing file.

## UI/UX Design

Expand Down Expand Up @@ -87,23 +85,22 @@ The following options are available
--moniker Filter results by moniker
--scope Select install scope (user or machine)
--locale Locale to use (BCP47 format)
--filename The value to rename the downloaded executable file to
-v, --version Use the specified version; default is the latest version
-s, --source Find package using the specified source
-a, --architecture Select the architecture to install
-e, --exact Find package using exact match
-o, --log Log location (if supported)
-p, --path Location to download file(s) to
-o, --output Location to download file(s) to
--installer-type Specifies the filetype for the installer
--ignore-security-hash Ignore the installer hash check failure
--accept-package-agreements Accept all license agreements for packages
--filename The value to rename the downloaded executable file to
--help Shows help about the selected command
--wait |Prompts the user to press any key before existing
--verbose, --verbose-logs Enables verbose logging for WinGet
```

WinGet search will be used to enlighten customers of the application installers downloadable status. the new column will only be displayed if the application has an installer can be downloaded.
WinGet search will be used to enlighten customers of the package's installers downloadable status. the new column will only be displayed if the application has an installer can be downloaded.

```
PS C:\> winget search Microsoft.VisualStudioCode
Expand All @@ -113,6 +110,21 @@ Microsoft Visual Studio Code Microsoft.VisualStudioCode 1.75.0
Microsoft Visual Studio Code Insiders Microsoft.VisualStudioCode.Insiders 1.76.0 winget
```

WinGet PowerShell cmdlet:

```PS
PS C:\> Get-WinGetPackage Microsoft.VisualStudioCode
Directory: C:\Users\Roy\Downloads
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 11/23/2021 10:05 AM 410253 Microsoft.VisualStudioCode.exe
```


## Capabilities

### Accessibility
Expand All @@ -135,13 +147,13 @@ There will be no breaking changes to the code. A subsection of the WinGet Instal

## Potential Issues

* Modifications to how WinGet retrieves application installers from the Package Manifest URLs could impact the functionality of the WinGet Install command.
* Modifications to how WinGet retrieves package's installers from the Package Manifest URLs could impact the functionality of the WinGet Install command.
* Update to the Schema will include the isDownloadable, this could impact services that use older versions of the schema that do not include the isDownloadable.
* Customers could overwrite an existing file with the same name as the downloaded file.

## Future considerations

* Downloading of Microsoft Store UWP applications.
* Downloading of UWP applications with install type: msstore.
* PowerShell cmdlet for download automation

## Resources
Expand Down

0 comments on commit 515bea5

Please sign in to comment.