Command for "cmd" to update all the software in windows?

In Ubuntu sudo apt-get update update all packages.

Like Ubuntu, does Windows also have any command for cmd to update all installed software in Windows?

4

4 Answers

Windows system files, Microsoft Store apps and, optionally, Microsoft products are updated through the Windows Update control panel application, though this does not have the power of the Debian Advanced Package Tool (apt) to update all added PPA's. You can open the Windows Update CPL from the CMD prompt (terminal, for Linux users) to find and to automatically install updates:

  • Press Windows, type cmd, press ShiftCtrlEnter and click Yes in the UAC dialog to get CMD running as Administrator.
  • Enter start ms-settings:windowsupdate-action to cause the CPL application to fetch the latest updates.

You can also put this script into a batch (shell script) file (e.g. update.bat), but you might need to run it as Administrator

At one time, MS provided the application wuauclt.exe in the \System32\ folder to enable manual update from CMD, but apparently that application no longer works. It is possible to call the Windows Update Agent programmatically, but the code MS provides in that VB example is 120 lines long, a far cry from sudo apt-get update. There are also examples to perform that task through MS PowerShell, though some examples require installing untrusted modules in PowerShell.

3

You can install [some] software using the 3rd-party equivalent of apt in Ubuntu/Linux or brew in macOS - Chocolatey and Scoop, both of which allow the upgrading of software installed via those package managers.

  • Chocolatey:

    choco upgrade all -y
  • Scoop:

    scoop upgrade

There are a few ways to archieve that:

Both work fine, but the first is probably better if you want to do it purely via command-line; however, keep in mind, unlike apt-get update, only MS-software can be updated this way - there is no centralized package manager for all Windows software.

I believe that the closest command is the 'appget update-all' via prompt, after installing the AppGet app.enter link description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like