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

Add option to specify winget install directory #201

Closed
jwlodek opened this issue May 19, 2020 · 9 comments
Closed

Add option to specify winget install directory #201

jwlodek opened this issue May 19, 2020 · 9 comments
Labels
Area-Settings Issue related to WinGet Settings Issue-Feature This is a feature request for the Windows Package Manager client.
Milestone

Comments

@jwlodek
Copy link

jwlodek commented May 19, 2020

Description of the new feature/enhancement

I usually install certain programs onto a secondary D: drive, so it would be nice if I could specify a different location than default. This is mainly for when I have a smaller SSD and larger hard disk side by side

Proposed technical implementation details (optional)

Some form of system-wide configuration to set default install location.
Certain programs I would like to install in the default location however (things that I want to run off of the SSD), so there should be a flag that can override default configured install location. Ideally any specified location should be added to the PATH so that I know I have access to whatever I install.

@jwlodek jwlodek added the Issue-Feature This is a feature request for the Windows Package Manager client. label May 19, 2020
@arjvintech
Copy link

I agree -- the specification of the install drive would be very helpful. It would be nice if the drive could be specified:

  1. On all winget installs via a settings file
  2. With the ability to override on a per winget install call

I believe it would be better to separate the PATH issue from this feature request. I can think of several instances where updating the PATH may not be desired.

@JohnMcPMS
Copy link
Member

For individual invocations, you can use:
-l,--location Location to install to (if supported)

Not all installers support passing an install location on the command line, so this won't guarantee things though.

@denelon denelon added this to the Package Manager Backlog milestone May 23, 2020
@denelon denelon modified the milestones: Package Manager Backlog, Package Manager v0.19.x Aug 24, 2020
@denelon denelon added the Size-S label Sep 24, 2020
@G0rocks
Copy link

G0rocks commented Mar 11, 2021

These issues are similar: #337 , #489

@denelon denelon modified the milestones: Package Manager v0.19.x, Package Manager Backlog, Backlog - Windows Package Manager, v.Next - Windows Package Manager May 3, 2021
@dpurge
Copy link

dpurge commented Jun 17, 2021

Can we push manifest authors more to support "--location" parameter?

Eg. require that packages which do not support "--location" must declare lack of support, so that winget knows whether any given package supports it.

If "--location" was specified, but package does not support it, winget could return an error, or optionally ask "This package does not support --location parameter, do you want to continue installation in the default location? (y/N)"

I do not like winget silently ignoring my "--location" parameter and installing in the default location.
(Looking at you, wingetcreate)

@ghost
Copy link

ghost commented Jul 2, 2021

That would be awesome if you could do that! I only have a 128 GB M2 SSD where Windows is installed. So because of that I have to install all my programms on my secondary SATA SSD drive to "D:/Program Files" or "D:/Program Files (x86)" which has 2 TB capacity. Physically separating my programms from my OS also means less pain if I have to reinstall Windows.

@Copystrike
Copy link

Should this issue not be closed since you can now achieve it with https://github.com/microsoft/winget-cli/blob/master/doc/Settings.md#default-install-root ?

@denelon
Copy link
Contributor

denelon commented Aug 19, 2022

Thanks for calling this out.

@denelon denelon closed this as completed Aug 19, 2022
@qwell
Copy link

qwell commented Jul 21, 2023

I'm pretty confused by the closure of this issue.

  1. The docs show that the defaultInstallRoot setting requires the package manifest to have InstallLocationRequired. As of today, a search in winget-pkgs shows that there are a total of two packages that have ever set InstallLocationRequired. AutoHotkey.AutoHotkey added the setting in 2.0.2 and then removed the setting in 2.0.3, and nepnep.neofetch-win has it set to false; in other words, there are zero packages that use this.
  2. There is a separate setting for this in Windows (Storage Settings > Where new content is saved > New apps will save to) that also doesn't appear to be used.

As it stands now, there does not appear to be any way of specifying a default install location for any non-portable packages (where a different setting is used). Setting --location when installing new packages is rather burdensome and becomes even more of a problem when taking #2207 into account; --location also requires a full path, meaning that you can't just create an alias that always sets it to something like D:\Program Files\.

Am I completely missing something?

@SheepCommander
Copy link

SheepCommander commented Jul 21, 2024

This setting is only used when a package manifest includes InstallLocationRequired

One year later, only SEVEN packages have InstallLocationRequired set to true.

So there's still not a way to specify a install directory?

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

No branches or pull requests

9 participants