asheroto / winget-install

Install winget tool using PowerShell! Prerequisites automatically installed. Works on Windows 10/11 and Server 2019/2022.
https://bit.ly/winget-install
GNU General Public License v3.0
272 stars 33 forks source link

v4 - testing needed #36

Closed asheroto closed 8 months ago

asheroto commented 9 months ago

Hey fellow contributors!

@1ckov, @MisterZeus, @ChrisTitusTech, @uffemcev

Microsoft published some short URLs and an easy method to install winget. Because of that, I was able to remove a huge chunk of the winget-install code.

Here's what they now have on the winget page.

https://learn.microsoft.com/en-us/windows/package-manager/winget/#install-winget-on-windows-sandbox ![image](https://github.com/asheroto/winget-install/assets/49938263/e033740e-8905-41cb-9a56-e8b86d554e07)

I have tested the code for winget-install v4 on the following operating systems:

All seem to work great.

Can you guys test on your end and tell me if this new code is working for you too?

&([ScriptBlock]::Create((irm https://raw.githubusercontent.com/asheroto/winget-install/v4/winget-install.ps1))) -Force -Wait

Since winget itself requires the Add-AppxProvisionedPackage (which installs as a provisioned package + user), I realized there's no point to install the prerequisites as user using Add-AppxPackage, so might as well install everything with Add-AppxProvisionedPackage. Unless anyone can think of a good reason not to? This was initiated from #19. Details here.

Incrementing to version 4.0.0.

uffemcev commented 8 months ago

Unfortunately, I get this error. image

uffemcev commented 8 months ago

Manual installation also leads to an error. image

uffemcev commented 8 months ago

Perhaps VClibs and Xaml are dependencies and need to be specified as a separate parameter. In this case, the installation is successful.

Add-AppxProvisionedPackage -Online -PackagePath Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle -DependencyPackagePath Microsoft.UI.Xaml.2.7.x64.appx,Microsoft.VCLibs.x64.14.00.Desktop.appx -SkipLicense

image

asheroto commented 8 months ago

Whoa, nice. Thanks! Let me look at this closer and get back with you.

asheroto commented 8 months ago

wrong post, sorry about the previous notification today!

I'm testing this.

asheroto commented 8 months ago

Alright! I think I got it. Can you guys please try it now?

&([ScriptBlock]::Create((irm https://raw.githubusercontent.com/asheroto/winget-install/v4/winget-install.ps1))) -Force -Wait
uffemcev commented 8 months ago

Looks like everything is working! 👌

PS C:\Users\uffemcev> powershell "&([ScriptBlock]::Create((irm https://raw.githubusercontent.com/asheroto/winget-install/v4/winget-install.ps1))) -Force -Wait -Debug"
winget-install 4.0.0
To check for updates, run winget-install -CheckForUpdate

#################
# Prerequisites #
#################

Downloading VCLibs...
ОТЛАДКА: Downloading VCLibs from https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx to
C:\Users\uffemcev\AppData\Local\Temp\tmpF36.tmp

Downloading UI.Xaml...
ОТЛАДКА: Downloading UI.Xaml from
https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.7.3/Microsoft.UI.Xaml.2.7.x64.appx to
C:\Users\uffemcev\AppData\Local\Temp\tmp14C5.tmp

##########
# winget #
##########

ОТЛАДКА: Getting latest release...
Downloading winget license...
ОТЛАДКА: Downloading winget license from https://github.com/microsoft/winget-cli/releases/download/v1.6.3482/24146eb205d040e69ef2d92d7034d97f_License1.xml to C:\Users\uffemcev\AppData\Local\Temp\tmp1C38.tmp

Downloading winget...
ОТЛАДКА: Downloading winget from https://aka.ms/getwinget to C:\Users\uffemcev\AppData\Local\Temp\tmp2717.tmp

Installing winget and its dependencies...

############
# Complete #
############

winget installed successfully.
Checking if winget is installed and working...
winget is installed and working now, you can go ahead and use it.

Waiting for 10 seconds before exiting...
asheroto commented 8 months ago

Closed and manually merged. Thanks!

asheroto commented 8 months ago

Released and working. Thanks again guys!