microsoft / winget-cli

WinGet is the Windows Package Manager. This project includes a CLI (Command Line Interface), PowerShell modules, and a COM (Component Object Model) API (Application Programming Interface).
https://learn.microsoft.com/windows/package-manager/
MIT License
22.53k stars 1.39k forks source link

Offline install capability #4500

Open tnyard opened 1 month ago

tnyard commented 1 month ago

Description of the new feature / enhancement

I would like to be able to install a Winget application on an offline computer (not connected to the internet). example:

Download the package with the following command (on a computer connected to the internet) Winget download Winmerge.winmerge--download-directory c:\software --Scope machine

Copy the files downloaded to c:\software to the offline computers c:\software (Yaml file and program install file)

run the command "winget settings --enable LocalManifestFiles" to enable installing with Yaml files.

install the winget application with "winget install --manifest c:\software\WinMerge_2.16.40_Machine_X64_inno_en-US.yaml"

Proposed technical implementation details

another switch for a location of downloaded winget files, and if they don't exist or don't match the hash try to download.

tnyard commented 1 month ago

I am working on bring up my own winget-cli-restsource repository, but that has been delayed and I would like to start using winget format to prepare for when I get the repository in place.

stephengillie commented 1 month ago

Edit: I might have misunderstood the other Issue.

This could also be useful for testing a large download - could be downloaded once then installed and uninstalled numerous times. Might also be possible to do for large dependencies, and speed up validations.