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 portable packages in user mode without Developer Mode enabled #2368

Closed
denelon opened this issue Jul 25, 2022 · 5 comments · Fixed by #2401
Closed

Support portable packages in user mode without Developer Mode enabled #2368

denelon opened this issue Jul 25, 2022 · 5 comments · Fixed by #2401
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Milestone

Comments

@denelon
Copy link
Contributor

denelon commented Jul 25, 2022

Description of the new feature / enhancement

During testing for installing portable packages in user mode with Developer Mode disabled, we identified an error:

Users will be prompted for administrator mode to install portable packages if Developer Mode is disabled.

Reference: https://docs.microsoft.com/windows/win32/api/winbase/nf-winbase-createsymboliclinkw

Proposed technical implementation details

A solution for installing portable packages in user mode without requiring Developer Mode to be enabled.

@denelon denelon added the Issue-Feature This is a feature request for the Windows Package Manager client. label Jul 25, 2022
@ghost ghost added the Needs-Triage Issue need to be triaged label Jul 25, 2022
@denelon denelon removed the Needs-Triage Issue need to be triaged label Jul 25, 2022
@denelon denelon added this to the v1.4-Client milestone Jul 25, 2022
@jedieaston
Copy link
Contributor

jedieaston commented Jul 27, 2022

Hardlinks and NTFS Junctions (for folders) don't require administrator rights (at least, they don't seem to based on my reading of the docs for mklink): https://docs.microsoft.com/en-us/windows/win32/fileio/hard-links-and-junctions

It probably changes a lot of the portable app implementation, but wouldn't that be better to do now before people have a bunch of apps installed with symlinks that winget would have to migrate? The only functional difference I note is that hardlinks can't link to a different partition, but are we planning to support that for portable apps anyway?

@denelon
Copy link
Contributor Author

denelon commented Jul 28, 2022

I could see that potentially being a problem when we support installing to different locations.

@JohnMcPMS
Copy link
Member

It probably changes a lot of the portable app implementation, but wouldn't that be better to do now before people have a bunch of apps installed with symlinks that winget would have to migrate? The only functional difference I note is that hardlinks can't link to a different partition, but are we planning to support that for portable apps anyway?

We already support that; one can provide the install location for portables.

Hard links also won't work for archive portables that potentially need to be colocated with their satellite files, the hard link would execute at the "links" directory, not the package one.

I'm not sure that there is enough value to having a 3rd strategy that supports only standalone portables on the same volume.

@ghost ghost added the In-PR Issue related to a PR label Aug 1, 2022
@ghost ghost added Resolution-Fix-Committed and removed In-PR Issue related to a PR labels Aug 16, 2022
@ToothyDev
Copy link

Despite the PR supposedly fixing it, this issue still exists. Trying to install a portable package without admin or developer mode yields this error
image
That is despite the fact that according to the merged PR, it should have been fixed to not create a symlink - what's going on with this?

@aaronliu0130
Copy link

In case others don't know, the PR says

This fix first appears in v1.4.3132-preview

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