How to Batch Install Software with WinGet After Reinstalling Windows

In the past, before reinstalling Windows, I would take a screenshot of the list of apps I had installed. After reinstalling the system, I would look at that screenshot, visit each official website, download the installers one by one, and install everything manually.

Recently, after using package managers on Linux and macOS, such as apt, dnf, and Homebrew, I started to feel that it would be much more convenient and elegant if Windows could also install software in a similar way. That led me to WinGet, also known as Windows Package Manager. It is Microsoft’s command-line package manager for Windows, and on modern Windows 11 systems, it is usually available by default through App Installer.

With WinGet, you can install software from the command line instead of manually downloading installers from different websites.

Basic WinGet Commands

Searching and Installing

Installing a specific app with WinGet usually involves two steps: first, search for the package ID; then, install the app using that package ID.

First, open PowerShell. You can right-click the Windows logo — the same button you left-click to open the Start menu — and choose Terminal. You can also search for PowerShell from the Start menu.

For example, if I want to install PotPlayer, I can type the following command in the terminal. This means: search for packages that contain potplayer.

winget search potplayer

This may return several search results. At this point, you need a little judgment. Many WinGet package IDs use a format similar to DeveloperName.AppName. The first part is often the developer, organization, or project name, and the second part is the software name.

So in the search results, Daum.PotPlayer is the package ID we want for PotPlayer.

Then we run the second step:

winget install Daum.PotPlayer

You can either type Daum.PotPlayer manually or copy and paste it from the search results.

In Windows Terminal or modern PowerShell windows, you can usually use Ctrl+C and Ctrl+V for copying and pasting. In older console windows, selecting text and right-clicking may copy it, and right-clicking again may paste it.

If you want to be more precise, especially when writing scripts, you can also use the --id and --exact options:

winget install --id Daum.PotPlayer --exact

This tells WinGet to install the package with this exact ID.

Uninstalling

If you need to uninstall an app, you can use the uninstall command.

For example, to uninstall the PotPlayer package we just installed, run:

winget uninstall Daum.PotPlayer

If the software was installed earlier and you no longer remember its package ID, you can use the list command to view installed apps:

winget list

The apps shown by winget list include both apps installed through WinGet and apps installed by other methods. Apps installed through WinGet usually show winget in the Source column.

However, apps installed by other methods may not always be uninstalled smoothly through WinGet.

Upgrading

To check which apps can be upgraded, run:

winget upgrade

This command only shows the available upgrades. It does not upgrade anything yet.

If you want to upgrade all apps listed there, run:

winget upgrade --all

If you only want to upgrade one specific app, copy its package ID and run a command like this:

winget upgrade Daum.PotPlayer

In practice, I recommend running winget upgrade first to preview the list, and then deciding whether to upgrade everything with winget upgrade --all.

Batch Installation Script

The package IDs we search for can be saved for future use. After reinstalling Windows, we can use the saved list of package IDs to run winget install commands one by one.

This avoids the trouble of going to each software website manually. It also reduces the need to rely on third-party software managers, which may include ads, recommendations, or bundled software.

Instead of installing each app one by one, we can also put the saved package IDs into a PowerShell script and let WinGet install them automatically.

Here is the batch installation script I currently use. You can add or remove apps according to your own needs:

$apps = @(
    "SublimeHQ.SublimeText.4",
    "Daum.PotPlayer",
    "Valve.Steam",
    "HandBrake.HandBrake",
    "Cryptomator.Cryptomator",
    "WinFsp.WinFsp",
    "PDFArranger.PDFArranger",
    "Anki.Anki",
    "FastStone.Viewer",
    "ShareX.ShareX",
    "voidtools.Everything",
    "M2Team.NanaZip",
    "chrox.Readest",
    "LocalSend.LocalSend",
    "Gyan.FFmpeg"
)

foreach ($app in $apps) {
    Write-Host "Installing: $app" -ForegroundColor Cyan

    winget install --id $app --exact --source winget --accept-package-agreements --accept-source-agreements
}

The important part is the $apps list. Each line is a WinGet package ID. If you want to add another app, search for its package ID first and then add it to the list.

The foreach loop goes through the list and installs each app automatically.

In the install command:

--id

means we are installing by package ID.

--exact

means the ID must match exactly, which helps avoid installing the wrong package.

--source winget

means we are using the WinGet source.

--accept-package-agreements
--accept-source-agreements

automatically accepts package and source agreements, so the installation process does not stop repeatedly to ask for confirmation.

Some apps may still require administrator permission, additional confirmation, or a restart. If something fails during batch installation, you can copy the corresponding winget install --id Package.ID --exact command and run it separately to see the detailed error message.

Usually, you do not need to run winget source update manually. But if you have just reinstalled Windows, or if WinGet cannot find an app that should exist, you can try updating the source data first:

winget source update

After that, search or install again.

Final Thoughts

For me, the biggest benefit of WinGet is not just that it saves a few clicks. More importantly, it changes the workflow after reinstalling Windows.

Instead of relying on screenshots, memory, browser downloads, and manual installers, I can keep a clean list of package IDs and use a script to rebuild most of my software environment.

It feels much closer to the package manager experience on Linux and macOS, and it makes reinstalling Windows much less tedious.