Closed uffemcev closed 12 months ago
Hey again!
Just want to confirm... so restarting the computer fixes the issue, yes?
But if we run this command instead, no restart is required?
Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
Yes it is.
Cool. Have you confirmed this works on your end? Meaning have you run the command yourself and seen winget start working afterwards?
If on Windows 10 I can have it execute that command and then that should ensure winget runs.
Yes exactly. Now I will reinstall the system again and upload the full log.
Sorry for russian language in logs. I confirm that this command initializes winget after using your script on freshly installed windows 11 22H2. No reboot is required. No account logout is required.
Excellent. I will take a look at this in the next few days to implement. I appreciate you pointing this out!
Hey there, just added it. You should now see this when running. Can you please confirm this works in version 3.0.2
?
Hello! Thanks for this, but this command works in Windows 11 too, my system is 11, not 10. Sorry I didn't say this earlier. Perhaps it makes sense to check not only for 10, but also for 11.
Something like that:
Ah understood. I've got it fixed in version 3.1.1
.
Also I added this method of use: https://github.com/asheroto/winget-install#method-2---one-line-command-runs-immediately
Going to close this issue, let me know if you think we need to reopen it. I think it should be working now for you on all OS versions.
I see the changes, thank you very much! Everything works as it should.
Thanks for letting me know about that, it should help others!
What You Are Seeing?
Hello, it's me again! :) After running the script on a freshly installed system I get this result:
Log
Checking if winget is installed and working... ПРЕДУПРЕЖДЕНИЕ: winget is installed but is not detected as a command. Try using winget now. If it doesn't work, wait about 1 minute and try again (it is sometimes delayed). Also try restarting your computer. ПРЕДУПРЕЖДЕНИЕ: If you restart your computer and the command still isn't recognized, please read the Troubleshooting section of the README: https://github.com/asheroto/winget-install#troubleshooting ПРЕДУПРЕЖДЕНИЕ: Make sure you have the latest version of the script by running this command: winget-install -CheckForUpdate PS C:\Users\uffemcev> winget winget : Имя "winget" не распознано как имя командлета, функции, файла сценария или выполняемой программы. Проверьте правильность написания имени, а также наличие и правильность пути, после чего повторите попытку. строка:1 знак:1 \+ winget \+ ~~~~~~ \+ CategoryInfo : ObjectNotFound: (winget:String) [], CommandNotFoundException \+ FullyQualifiedErrorId : CommandNotFoundExceptionEven after installation via a script winget is still not initialized in the system. The problem can be solved by restarting the PC, but there is another way to solve this. Microsoft suggests using this command: Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe
After this the winget is ready for work instantly. So what do you think about this?
System Details
Script verson 3.0.1 Windows 22H2 UAC disable Powershell 5.1 Run as administrator