This command line will upgrade many things:
winget upgrade --all --include-unknown
This command line will upgrade many things:
winget upgrade --all --include-unknown
To do this, one must set a registry entry, this is Powershell:
$registryPath = "HKLM:\SYSTEM\Setup\MoSetup"; If ( !(Test-Path $registryPath) ) { New-Item -Path $registryPath -Force; }; New-ItemProperty -Path $registryPath -Name "AllowUpgradesWithUnsupportedTPMOrCPU" -Value 1 -PropertyType DWORD -Force;
then download the ISO (not the recommended upgrader app), unpack it, and run setup.exe.
This is a curious method, seemingly very reliable, and it has many different builds, including 22H2, 23H2, 24H2 as of right now. Here’s the last 22H2:
uupdump.net/selectlang.php?id=0cda15f9-a14a-4adf-bb3c-2ce79d0de621
It is not the ISO itself, it is a script setup which uses OS resources to build an ISO.
It’s built into the latest builds of Windows 10 and 11 and Server, and can be installed into many.
To see if you have it, try winget list
from CMD or Powershell. If you don’t have it on a newer platform with the Microsoft store, or if it does not work properly, try this Powershell:
# Install VCLibs Add-AppxPackage 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx' # Install Microsoft.UI.Xaml.2.7.3 from NuGet Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3 -OutFile .\microsoft.ui.xaml.2.7.3.zip Expand-Archive .\microsoft.ui.xaml.2.7.3.zip Add-AppxPackage .\microsoft.ui.xaml.2.7.3\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx # Install the latest release of Microsoft.DesktopInstaller from GitHub Invoke-RestMethod 'https://api.github.com/repos/microsoft/winget-cli/releases/latest' | % assets | ? name -like "*.msixbundle" | % { ($InstallerFileName = $_.name) } Invoke-RestMethod 'https://api.github.com/repos/microsoft/winget-cli/releases/latest' | % assets | ? name -like "*.msixbundle" | % { Invoke-WebRequest $_.browser_download_url -OutFile $_.name }dAdd-AppxPackage $InstallerFileNamed # Fix permissions TAKEOWN /F "C:\Program Files\WindowsApps" /R /A /D Y ICACLS "C:\Program Files\WindowsApps" /grant Administrators:F /T # end script
One good way to test it, is to install Microsoft .NET framework (SDK) 6, thus, from administrative Powershell:
winget install --id Microsoft.DotNet.Runtime.6 --silent --accept-source-agreements
I learned just now that if you add other seemingly valuable options to the one above, e.g., --scope machine
, at least while running as SYSTEM, it will fail citing package not found. So you’ll want to test carefully.
Here’s one proven just now for 7zip (there’s a “search” option in winget to get the ID):
winget install --exact --id 7zip.7zip --accept-package-agreements --silent --scope machine
Here’s one for Google Chrome, needs a bit of extra:
winget.exe install --exact --id Google.Chrome --silent --accept-package-agreements --accept-source-agreements --scope machine
If you do want to use it from the SYSTEM account, in scripting, it gets interesting. You’ll want to first run this:
$ResolveWingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe" if ($ResolveWingetPath){ $WingetPath = $ResolveWingetPath[-1].Path } $ENV:PATH += ";$WingetPath"
and then winget will run as expected.
Adding Winget on Windows 10/2019/2016 builds 1809 or lower is touch and go. This worked as a prerequisite on a recent Server 2019/1809, with the addition to the path above:
# Install VCLibs Add-AppxPackage 'https://aka.ms/Microsoft.VCLibs.x64.14.00.Desktop.appx' # Install Microsoft.UI.Xaml.2.7.3 from NuGet Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/Microsoft.UI.Xaml/2.7.3 -OutFile .\microsoft.ui.xaml.2.7.3.zip Expand-Archive .\microsoft.ui.xaml.2.7.3.zip Add-AppxPackage .\microsoft.ui.xaml.2.7.3\tools\AppX\x64\Release\Microsoft.UI.Xaml.2.7.appx # Fix permissions TAKEOWN /F "C:\Program Files\WindowsApps" /R /A /D Y ICACLS "C:\Program Files\WindowsApps" /grant Administrators:F /T
Here it is:
It’s also available via Winget: winget install "Lenovo System Update"
Lots of interesting recently-updated tools here:
www.dell.com/support/kbdoc/en-us/000126750/dell-client-command-suite
HP Support Assistant is the oft-default tool, not suitable for automation; but there is the HP Image Assistant:
ftp.ext.hp.com/pub/caps-softpaq/cmit/HPIA.html
So far this looks like the way forward. Early testing done, not thorough yet. It has a GUI for default use, but also has command line usage. Download the installer, complete it, CD to the folder it created in command-line, and run HPImageAssistant.exe for nice GUI. Documentation is here:
ftp.hp.com/pub/caps-softpaq/cmit/imagepal/userguide/936944-008.pdf
Several command-line examples are in that PDF. This command does a lot of very good things, very silently:
.\HPImageAssistant /Operation:Analyze /Category:All,Accessories /selection:All /action:Install /silent /reportFolder:c:\HPIA\Report /softpaqdownloadfolder:c:\HPIA\download
This one works very well indeed. It does need a bit more technical intervention:
A very interesting .EXE which appears to be able to upgrade Build 1909 directly to 22H2.
We have machines that we want kept on Windows 10, we don’t want users urged over and over again to upgrade to 11. Run this Powershell, reboot (probably), and we’re good:
# Exit script if this is not Windows 10 If ((Get-ComputerInfo | Select OSName).OSName -notlike "Microsoft Windows 10*") { "This is not Windows 10. Exiting..." Exit } # Proceed Set-Location -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows If (-Not (Test-Path -Path WindowsUpdate)) { MKDIR WindowsUpdate } Set-Location -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate New-ItemProperty -Path . -Name "ProductVersion" -Value "Windows 10" "Done!"
Note that many so-called solutions out there set things so no further updates, including Windows 10 build upgrades, will happen at all. The above simply limits things to Windows 10.