gusztavvargadr / packer

Packer templates for building Windows and Ubuntu images
https://app.vagrantup.com/gusztavvargadr
The Unlicense
456 stars 67 forks source link

No winget with winget source on Windows 11 boxes? #462

Closed eggbean closed 5 days ago

eggbean commented 5 days ago

I am finding it very difficult to re-install winget on the Win11 box with the winget source (it only has the MS Store source). The other Windows 11 boxes don't seem to have been updated in a long time.

EDIT: I managed to fix winget like this:

Start-BitsTransfer -Source "https://github.com/microsoft/microsoft-ui-xaml/releases/download/v2.8.6/Microsoft.UI.Xaml.2.8.x64.appx" -Destination ".\Microsoft.UI.Xaml.2.8.x64.appx"
Add-AppxPackage -Path ".\Microsoft.UI.Xaml.2.8.x64.appx"
Start-BitsTransfer -Source "https://github.com/microsoft/winget-cli/releases/download/v1.9.2411-preview/Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle" -Destination ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
Add-AppxPackage -Path ".\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe.msixbundle"
gusztavvargadr commented 5 days ago

@eggbean can you share the details of your Vagrant setup and the exact steps you try with winget so I can try to reproduce locally?

eggbean commented 5 days ago

@gusztavvargadr Thanks, but I found the download for Microsoft.UI.Xaml.2.8 and managed to get winget working. Cheers.

gusztavvargadr commented 5 days ago

Let me know if you need any features in the boxes, and I can try adding them by default in an upcoming release. Thanks for posting your solution!

eggbean commented 5 days ago

It would be great if winget is fully working with the winget source, as the boxed only have the MSStore source which I'm sure most people wouldn't find as useful. This is the Vagrantfile I'm using. It might not be optimal, heh. Thanks.

Vagrant.configure("2") do |config|
  config.vm.box = "gusztavvargadr/windows-11"
  config.vm.box_version = "2302.0.2409"
  config.vm.provider "virtualbox" do |vb|
    vb.gui = true
    vb.memory = "4096"  # Allocate more memory if necessary
    vb.cpus = 2         # Adjust CPU count if necessary
  end
  config.vm.boot_timeout = 600
  config.vm.network "forwarded_port", guest: 3389, host: 53389
end