Open denelon opened 3 years ago
The Windows Package Manager import file should be able to support a more complex schema including the install location, even if winget export
doesn't (yet).
So combine winget import -i <import-file>
with —location <path>
is not possible if I understand it correctly?
That's correct as you would be attempting to install "all" packages with that path which doesn't make sense in the context of import. We would need to support the location in the schema for the package.json file.
Now (or in the near future), will Winget support exporting with the installation location of the program when using the "export" command? Or can I edit .Json
file manually to specify the installation location of each program? Because I may have such requirements: ① Install some programs with large size on disk D; ② Install some private programs in the C: \Users\<UserName>\…
folder; ③ Install the portable program into the Ondrive sync folder to back up my portable application and its settings.
I have browsed export command And inport command before, but those documents don't seem to help me.
----Translated by fanyi.baidu.com
That will only work for packages where getting their install location is reliable. Since users can still make changes outside of WinGet, we need to make sure that we're not making assumptions on things users might have changed.
[Policy] Command-Import
I also had the same issue and like another stated, updating to preview worked for me BUT for some reason the powershell command to update didn't fix it (even tho it installed properly from what I can tell) but using the Appx packager installer method did work and fixed my issues
Is the following command possible?
winget import -i <import-file> —location <path>
If not, how can I use the import command to control where it should be installed?
Originally posted by @PhilippBaumi in https://github.com/microsoft/winget-cli/discussions/1521#discussioncomment-1467325