Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support install location via import #1582

Open
denelon opened this issue Oct 12, 2021 · 7 comments
Open

Support install location via import #1582

denelon opened this issue Oct 12, 2021 · 7 comments
Labels
Command-Import Issue related to WinGet Import Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@denelon
Copy link
Contributor

denelon commented Oct 12, 2021

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 #1521 (reply in thread)

@ghost ghost added the Needs-Triage Issue need to be triaged label Oct 12, 2021
@denelon
Copy link
Contributor Author

denelon commented Oct 12, 2021

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).

@denelon denelon added Issue-Feature This is a feature request for the Windows Package Manager client. and removed Needs-Triage Issue need to be triaged labels Oct 12, 2021
@PhilippBaumi
Copy link

So combine winget import -i <import-file> with —location <path> is not possible if I understand it correctly?

@denelon
Copy link
Contributor Author

denelon commented Oct 12, 2021

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.

@jiaojiaodubai
Copy link

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

@denelon
Copy link
Contributor Author

denelon commented Oct 31, 2022

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.

@Trenly
Copy link
Contributor

Trenly commented Jun 16, 2023

[Policy] Command-Import

@microsoft-github-policy-service microsoft-github-policy-service bot added the Command-Import Issue related to WinGet Import label Jun 16, 2023
@gex581990
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Command-Import Issue related to WinGet Import Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests

5 participants