The *.appxbundle installer does not automatically add the installation directory for winget.exe to the PATH environment variable in Windows 10 #210
Comments
|
I just installed the appxbundle and I could not immediately run |
It did seem to activate it's alias correctly, but yet it still did not add to the PATH variable--however @aslze mentions he needed to log out and back in for it to work.
|
|
I seemingly had the same or similar PATH problem. I installed I installed When trying to run In order to make it work I had to add this to my system environment variable for PATH:
UPDATED: Added operating system Info Windows 10 Pro (not insiders) |
|
I installed via the via the *.appxbundle installer a few minutes ago and was able to open a CMD and "winget show firefox" immediately: no problem found. I am logged into Windows as an administrator, in case that's pertinent. |
|
This MUST be part of your $PATH variable:
without the above in $PATH NONE of the Apps installed in WindowsApps can be executed from shell. Don't know, if the above directory is part of $PATH by default? |
|
My path is set correctly, but the alias didn't get setup. Is there a way to manually add it? Or something else I can try? |
|
Well, i do have the correct PATH setup for the Windows Apps folder. But inside of it there isn't a Winget.exe file, so i get the same error with the winget command. I don't have a Windows Insider Build, used the link to use the App Installer through the Windows Store. I reseted the App Installer app in the configurations, then tried to install it again. But there in't any alias for Winget.exe nor an executable file. Any ideas? |
I'm having the same issue, and i used the same installation method. I couldn't notice any change in the Installation App. |
|
BTW: I'm on v1803. (Need to get IT to upgrade me.) |
|
I've the same issue the last four people above me have been facing. |
|
Same as the above, I installed through the App Store and restarted my machine (build 19041), and confirmed that However, |
I'm experiencing this too after signing up to the Windows Package Manager Insiders Program and attempted to download and install from the store. |
|
@alexmacniven I had the exact same issue. I went to https://github.com/microsoft/winget-cli/releases and ran the appxbundle asset at the bottom and that updated my app installer. Winget works now. I think the only issue with doing it this way is that it will no longer update automatically. But at least it works now. |
|
After updating manually, Winget did not work. The solution that worked for me was to add an absolute address path to the enviromental variable of PATH Following the instructions from the automated email did not work, the manual install has a better success rate overall after installing on three machines. |
== |
|
@Pentao Try running the shell in administrative mode. |
|
I ran into this today on a brand new machine and install. Rebooting (which logs me out, of course, like some folks have suggested above) made it work for me. |
|
I don't think #235 is an exact duplicate. The focus of that issue is on the misleading and confusing message. |
Had the same on W10 2004 Build.19401 today. As above, installed the App Installer package from store then pulled latest version from GH.... |
|
windows terminal is experiencing the same problem. They identified it as the store/centennial/appx install process for Can someone at Microsoft escalate this shared issue to the Microsoft team(s) responsible for that area? |
|
Windows adds the PATH entry itself - it's part of your default user profile, and nothing to do with any particular APPX installer or even the Store. Changing from REG_EXPAND_SZ back to REG_SZ will be due to a third-party installer. I've been tracking issues like this for a while, as they affect the Centennial package of Python. We've already fixed a few issues relating to apps disabling or resetting their aliases on package update, and also fixed a regression in a security patch late last year. The first couple of issues could have been either of those (though if you've got WinGet you should be on an insider build with fixes for those... so I'm still leaning towards third-party installer). Most of the reports in this thread seem to be people who are not getting the preview build of App Installer. Unfortunately, it's not real obvious how to make sure you have the preview version here. Running |
|
Naturally, anything with write access (has nothing to do with an installer) to I think it is reasonable for the infrastructure
That would require the dependency of app aliases to do at a minimum
Seems to me the dependency handing of
|
Yeah, that is the issue I am facing too. I applied for the preview program, got an email asking to install the Preview version on App Installer. But I don't see any updates that are available in the store.
My version is |
For anybody else following this, to install the appxbundle you can open PowerShell (no need for admin as it installs in user account) and enter the following command replacing pathToAppXBundle with the downloaded AppxBundle file.
It's a shame this isn't working for lots of us though and we are having to install manually as this makes it difficult to get traction on this solution and we lose the benefit of automatic upgrades via the Store. I had the same issue as several people here that the App Installer is already showing as Installed before I signed up for the App Installer Insider program and there doesn't seem to be any way to coax it into reinstalling. I think I might open a new issue for this but I expect it is a limitation of the Microsoft Store rather than something that can be fixed by a PR on this project. |
As per Sayak's comment this should resolve itself given time. Lots of time! Like go to bed and wait until tomorrow sort of time :) |
|
@Caltor I've been waiting for 25 days and it still doesn't work.
|
|
@MisinformedDNA Oh dear. I've reopened this issue #391 for you. Might be best to post your comments there or open your own new issue, as this issue is for the problem with the PATH. |
Run this to check version Add-AppxPackage -Path pathToAppXBundle if it's not right go click that appxbundle link |
|
Wanted to chime in, I downloaded the latest appxbundle as of today from the releases section, installed it, and was not able to access "winget" from the command line or developer command prompt. Reinstall did not help. Once I added If it works for you without adding it, then you must already have that as part of your PATH -- maybe some other dev tool you have installed added it for you -- but it's clearly not the default, so please add this to your installer. Edit: Also, I suspect that adding it to the System's path (and not just the user's path) might be important here, (i.e. if you want to use it from an elevated command prompt.) |
I also had this issue on one of my devices, but this week I installed it from the appxbundle on a Windows 2004 clean install and it worked right away without anything, so I guess it depends on some other factors. |
|
I've been having a similar issue. It looks like the appxpackage installer installs a link to the python page on windows store, instead of an app that actually does anything. I thought maybe it was a dependency or prerequisite issue so I tried installing the Python from the Windows Store, but it didn't solve anything. |
|
I've noticed the problem with the app aliases not being available - it appears as though the problem is that the alias directory itself is not on the path (and periodically disappears when you manually add it). Insert this into your Powershell profile to manually add it to your path for each session. $env:Path += ";$env:LocalAppData\Microsoft\WindowsApps"; |
|
Why is the installer putting Winget in the current user's localAppData directory? That makes it usable only by the current user. It should install to either %ProgramFiles%, %ProgramFiles(x86)% or %windir%\System32 so it will be accessible to all users. |
|
@SamHills I think your problem is different issue. You should open it in new issue |
|
I don't think it is a different issue. -- Now that I think about it -- My command line sessions are run as an administrator -- so that would lead to all sorts of issues (including this one). It could be a red herring but like... -- my understanding is that when you run things as administrator, it's a different user profile -- different %PATH% variables, etc. (machine path is still the same, but current user path is different). At any rate, it should definitely not be installing it in the user's appdata - because that's not where software should ever be installed anyway. (It's for data, not software -- and maybe THAT is another bug -- but still, #wtf...) Back on point though: if it's only updating the current user's path and not the machine's path, that would explain why running as an admin means the software doesn't work. Also it would explain some of the discrepancies in this bug -- like someone said (paraphrased) "I had the same problem on my dev machine, but on a clean install everything just worked." -- because on a clean install they probably weren't running the command line as an admin (since that's not the default behavior, but it's a very common dev./power user thing to have setup). |
same here |
|
The Python redirector is in the AppInstaller package along with winget because it was a sensible place to put it, that's all. It's unrelated to (and predates) Winget. As for the install location, all the application files go into ProgramFiles, but there's still a bit of per-user registration that makes it look like a per-user install. That gives each user their own "view" of it, even though the entire install is shared (and secured). This particular package should be automatically installed for all users though, so you ought to have Winget as admin. However, I'm guessing the global alias is not being created for users who are not logged in (I'm not 100% sure how that bit gets handled, but some of the Winget team are close enough to the right people to find out). |
|
Does anyone know how to add alias manually into |






Brief description of your issue
When installing winget via the *.appxbundle installer, the installation directory for winget.exe is not automatically added by the installer to the PATH environment variable; this should have been added automatically so that the CLI commands can work out of the box.
Steps to reproduce
Expected behavior
The installation folder for winget is added to the system PATH environment variable.
Actual behavior
The installation folder for winget is not added to the system PATH environment variable.
Environment
The text was updated successfully, but these errors were encountered: