Skip to content

Command line alias symlink is not added to "%LOCALAPPDATA%/Microsoft\WinGet\Links", even though it is on a Windows Sandbox instance #6043

Closed as not planned

Description

@tonur

Relevant area(s)

WinGet CLI

Relevant command(s)

winget install

Brief description of your issue

On my PC, a recently reinstalled Windows 11 23H2, I experience that Winget installed apps with a PortableCommandAlias value does not add a symlink to the "%LOCALAPPDATA%/Microsoft\WinGet\Links" folder. But when I do it on a Windows Sandbox instance, it adds it without issues.

Testing this with the winget install int128.kubelogin which manifest is seen with a PortableCommandAlias here: https://github.com/microsoft/winget-pkgs/blob/master/manifests/i/int128/kubelogin/1.35.2/int128.kubelogin.installer.yaml

I tried updating Winget from the latest Github release without any success and I am running the latest version:
winget --version
v1.28.190

Steps to reproduce

winget install int128.kubelogin
Get-Item $env:LOCALAPPDATA/Microsoft\WinGet\Links\kubectl-oidc_login

Expected behavior

Image

Actual behavior

Image

Environment

[winget --info]
Windows Package Manager v1.28.190
Copyright (c) Microsoft Corporation. All rights reserved.

Windows: Windows.Desktop v10.0.22631.6491
System Architecture: X64
Package: Microsoft.DesktopAppInstaller v1.28.190.0

Winget Directories
-------------------------------------------------------------------------------------------------------------------------------
Logs                               %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\DiagOutputDir
User Settings                      %LOCALAPPDATA%\Packages\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\LocalState\settings.json
Portable Links Directory (User)    %LOCALAPPDATA%\Microsoft\WinGet\Links
Portable Links Directory (Machine) C:\Program Files\WinGet\Links
Portable Package Root (User)       %LOCALAPPDATA%\Microsoft\WinGet\Packages
Portable Package Root              C:\Program Files\WinGet\Packages
Portable Package Root (x86)        C:\Program Files (x86)\WinGet\Packages
Installer Downloads                %USERPROFILE%\Downloads
Configuration Modules              %LOCALAPPDATA%\Microsoft\WinGet\Configuration\Modules

Links
---------------------------------------------------------------------------
Privacy Statement   https://aka.ms/winget-privacy
License Agreement   https://aka.ms/winget-license
Third Party Notices https://aka.ms/winget-3rdPartyNotice
Homepage            https://aka.ms/winget
Windows Store Terms https://www.microsoft.com/en-us/storedocs/terms-of-sale

Admin Setting                             State
--------------------------------------------------
LocalManifestFiles                        Disabled
BypassCertificatePinningForMicrosoftStore Disabled
InstallerHashOverride                     Disabled
LocalArchiveMalwareScanOverride           Disabled
ProxyCommandLineOptions                   Disabled
DefaultProxy                              Disabled

Activity

  1. added
    Issue-Bug
    Needs-Triage
    on Feb 11, 2026
  2. tonur commented on Feb 13, 2026

    @tonur
    Author

    Seems like more people are experiencing this here: int128/kubelogin#926 (comment)

  3. tonur commented on Feb 13, 2026

    @tonur
    Author

    I can confirm that this users workaround (Running the winget install int128.kubelogin command as Administrator) works: int128/kubelogin#926 (comment)

    Image

    But I have still no idea why it works on a fresh install, and not on certain users computers without Administrator.

  4. UnownPlain commented on Feb 14, 2026

    @UnownPlain

    This is probably #3437

  5. denelon commented on Feb 17, 2026

    @denelon
    Collaborator

    Symbolic links are only available to portable applications in WinGet if Developer Mode is enabled or the user is installing with elevated privileges.

    WinGet is only able to add portable applications explicitly on the path otherwise.

  6. denelon commented on Feb 17, 2026

    @denelon
    Collaborator

    The Windows Sandbox defaults to elevated privileges so symbolic links are available.

    Notably, some portable applications have dependencies on libraries and in those cases symbolic links will not work, so the WinGet manifest explicitly requires it.

  7. tonur commented on Feb 18, 2026

    @tonur
    Author

    Symbolic links are only available to portable applications in WinGet if Developer Mode is enabled or the user is installing with elevated privileges.

    WinGet is only able to add portable applications explicitly on the path otherwise.

    Demitrius Nelon (@denelon) can I then create a different bug in order to report a wrong message?

    Image

    This "Command line alias added: x" message is completely wrong when installing on a shell with no elevated privileges.

    I will add a comment in the WinGet-pkgs repo for Kubelogin regarding that this should always be installed with elevated privileges.

  8. tonur commented on Feb 18, 2026

    @tonur
    Author

    I created a new bug here: #6058

  9. tonur commented on Feb 18, 2026

    @tonur
    Author

    Also, just to confuse this even more, I can successfully replicate that the Command line alias is actually added when I test this in a VM:

    Image

    No elevated privileges, just Windows Terminal without admin. I am so confused as to why this works in a VM but not outside of the VM.

    I knew that I was not hallucinating when I tested it here: int128/kubelogin#926 (comment)

  10. cnotin commented on Jun 18, 2026

    @cnotin

    Same observation here! And indeed it's because it does so with a symlink which requires admin permissions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Command-InstallIssue-Bug

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions