You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Allow the user to export a list of all currently installed apps from WinGet.
This list can then be imported (with the specific versions too) on WinGet and its apps will be batch installed. Useful for a "dotfiles-based" computer setup, where I just have a winget-apps.json and can set my machine up with a single command.
Poposed commands:
winget export <app-list>
Here the user can specify an app list for exporting, or use --all or * for exporting the entire list.
winget import <file-path>
Edited by denelon:
Stable Feature winget import packages.json - installs packages referenced in packages.json (requires sources to be configured). winget import -? - displays help for the import command.
Experimental Feature winget export packages.json - generates export file for packages in Add / Remove Programs matching installed sources. winget export -? - displays help for the export command.
Note: export depends on list also being enabled.
winget features - displays all experimental features and their status winget settings - launches settings.json to configure settings like experimental features
For an example in other package managers see Homebrew's brew bundle.
Nice thing about it is it's easy to add support for other tools like Casks, mas, and whalebrew, all of which are (or started as) third-party extensions to brew.
Note: if you have a terminal or shell in your import, it will restart and interrupt the flow of package installation. I've had success with one of these packages if it's the last one in the list.
I wonder if export feature could also output list of generic unknown source and its version info from registry if available
How about driver info? As now Windows would like to push to DCH type, I though this type of driver give Windows more info and control.
Or those hidden OEM pre-install programs?
gioluca2 you can execute winget settings your default .json editor will open. If you have Visual Studio Code configured as your default editor the schema file at the top will help provide auto-complete and context aware help.
You can enable the "export" ("list" is also required) as an experimental feature to generate an initial file to start with: winget export packages.json for example.
Then you can edit the packages listed in that file to build an import. winget import packages.json for example.
We're still working on the logic for list (it drives export and several other features). I've made several changes recently to manifests to improve matching (including 7-zip). We have a client coming out in the next few days with changes implemented to improve matching logic. We will continue working on this area. It's the reason "list", "upgrade", "uninstall", and "export" are all still experimental features.
Quang Kieu (@quangkieu) what scenario would providing the list of applications without a known source address? You've piqued my interest 😄
Hey Demitrius Nelon (@denelon), mostly so the output of export match what winget list is showing and we could use the output as a way to compare between systems, easy to consume for next step in script as right now the winget list is much hard consume compare to json file
Eric Chen (@Airkro) feel free to request the feature covering the scenario you are interested in 😄. The initial intent for import was to give a single command to install a set of packages. Most of the users requesting that capability in asks I received were looking for unattended use cases. I think we will want to be able to have commands or arguments (and an import file structure) to support many other scenarios. Several installers don't support silent/unattended behavior. In order to allow those into the repository we need to ensure the silent/unattended scenario works for the other commands in the Windows Package Manager client.
Gio Luca (@gioluca), I did a search for all three. "Microsoft.Office" version 16.0.1329.20371 is available. You might need to create a "Help-Wanted" Issues in the https://github.com/microsoft/winget-pkgs repository to ask for the other two packages to be added.
Activity
gibfahn commentedon May 24, 2020
For an example in other package managers see Homebrew's brew bundle.
Nice thing about it is it's easy to add support for other tools like Casks, mas, and whalebrew, all of which are (or started as) third-party extensions to brew.
denelon commentedon May 28, 2020
This looks like a duplicate of #155 and #156
denelon commentedon Mar 4, 2021
The schema for the import file is located at https://aka.ms/winget-packages.schema.1.0.json
denelon commentedon Mar 18, 2021
I'll be publishing a build with "import" enabled next week if testing goes well. I'm publishing a sample file here as a starting point.
{ "$schema" : "https://aka.ms/winget-packages.schema.1.0.json", "CreationDate" : "2021- 3-18 13:14:44.599", "Sources" : [ { "Packages" : [ { "Id" : "Microsoft.Whiteboard" } ], "SourceDetails" : { "Argument" : "https://winget.azureedge.net/msstore", "Identifier" : "Microsoft.Winget.MSStore.Source_8wekyb3d8bbwe", "Name" : "msstore", "Type" : "Microsoft.PreIndexed.Package" } }, { "Packages" : [ { "Id" : "Microsoft.PowerToys" } ], "SourceDetails" : { "Argument" : "https://winget.azureedge.net/cache", "Identifier" : "Microsoft.Winget.Source_8wekyb3d8bbwe", "Name" : "winget", "Type" : "Microsoft.PreIndexed.Package" } } ], "WinGetVersion" : "0.2.10771" }denelon commentedon Mar 18, 2021
denelon commentedon Apr 2, 2021
Note: if you have a terminal or shell in your import, it will restart and interrupt the flow of package installation. I've had success with one of these packages if it's the last one in the list.
denelon commentedon Apr 22, 2021
Import was just released as a stable feature https://github.com/microsoft/winget-cli/releases/tag/v-0.3.11102-preview.
4 remaining items
quangkieu commentedon May 6, 2021
I wonder if export feature could also output list of generic unknown source and its version info from registry if available
How about driver info? As now Windows would like to push to DCH type, I though this type of driver give Windows more info and control.
Or those hidden OEM pre-install programs?
denelon commentedon May 6, 2021
Quang Kieu (@quangkieu) what scenario would providing the list of applications without a known source address? You've piqued my interest 😄
gioluca2 commentedon May 6, 2021
Sorry but I don't understand which settings you are talking about. Can you help me?
denelon commentedon May 6, 2021
gioluca2 you can execute
winget settingsyour default .json editor will open. If you have Visual Studio Code configured as your default editor the schema file at the top will help provide auto-complete and context aware help.You can enable the "export" ("list" is also required) as an experimental feature to generate an initial file to start with:
winget export packages.jsonfor example.Then you can edit the packages listed in that file to build an import.
winget import packages.jsonfor example.Here is a sample for settings.json:
{ "$schema": "https://aka.ms/winget-settings.schema.json", "experimentalFeatures": { "list": true, "export": true } }gioluca2 commentedon May 6, 2021
The command "winget list" returns wrong ids. I try to import this packages.json:
{ "$schema" : "https://aka.ms/winget-packages.schema.1.0.json", "CreationDate" : "2021-05-07T00:13:54.897-00:00", "Sources" : [ { "Packages" : [ { "Id" : "7-Zip" }, { "Id" : "Audacity_is1" }, { "Id" : "Bitdefender" }, { "Id" : "CCleaner" }, { "Id" : "Discord" }, { "Id" : "FFBATCH_cv_is1" }, { "Id" : "FormatFactory" }, { "Id" : "Mozilla Firefox (x64 it)" }, { "Id" : "Notepad++ (64-bit x64)" }, { "Id" : "OBS Studio" }, { "Id" : "ProPlusRetail - it-it" }, { "Id" : "Skype_is1" }, { "Id" : "VLC media player" }, { "Id" : "WhatsApp" }, { "Id" : "jdownloader2" }, { "Id" : "Microsoft.Edge" }, { "Id" : "Google.DriveFileStream" } ], "SourceDetails" : { "Argument" : "https://winget.azureedge.net/cache", "Identifier" : "Microsoft.Winget.Source_8wekyb3d8bbwe", "Name" : "winget", "Type" : "Microsoft.PreIndexed.Package" } } ], "WinGetVersion" : "0.2.10971" }denelon commentedon May 6, 2021
gioluca2 the "Id" needs to be the same value as "PackageIdentifier" in the v1.0 manifest schema. For example, "7-zip" should be "7zip.7zip"

gioluca2 commentedon May 6, 2021
And so I have to search all packages one by one...
denelon commentedon May 6, 2021
We're still working on the logic for list (it drives export and several other features). I've made several changes recently to manifests to improve matching (including 7-zip). We have a client coming out in the next few days with changes implemented to improve matching logic. We will continue working on this area. It's the reason "list", "upgrade", "uninstall", and "export" are all still experimental features.
quangkieu commentedon May 10, 2021
Hey Demitrius Nelon (@denelon), mostly so the output of export match what
winget listis showing and we could use the output as a way to compare between systems, easy to consume for next step in script as right now thewinget listis much hard consume compare to json fileAirkro commentedon May 12, 2021
will import support interactive to exclude some packages?
denelon commentedon May 12, 2021
Eric Chen (@Airkro) feel free to request the feature covering the scenario you are interested in 😄. The initial intent for import was to give a single command to install a set of packages. Most of the users requesting that capability in asks I received were looking for unattended use cases. I think we will want to be able to have commands or arguments (and an import file structure) to support many other scenarios. Several installers don't support silent/unattended behavior. In order to allow those into the repository we need to ensure the silent/unattended scenario works for the other commands in the Windows Package Manager client.
gioluca2 commentedon May 18, 2021
I can't find real ID of bitdefender, ffbatch and office 2019. Can you help me?
denelon commentedon May 18, 2021
Gio Luca (@gioluca), I did a search for all three. "Microsoft.Office" version 16.0.1329.20371 is available. You might need to create a "Help-Wanted" Issues in the https://github.com/microsoft/winget-pkgs repository to ask for the other two packages to be added.