https://github.com/mtpontes/winget-list-handler
Package installation automation via winget
https://github.com/mtpontes/winget-list-handler
automation nodejs package-manager windows winget winget-cli
Last synced: 7 months ago
JSON representation
Package installation automation via winget
- Host: GitHub
- URL: https://github.com/mtpontes/winget-list-handler
- Owner: mtpontes
- Created: 2025-01-07T00:31:43.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2025-02-21T20:00:50.000Z (8 months ago)
- Last Synced: 2025-02-21T20:33:14.607Z (8 months ago)
- Topics: automation, nodejs, package-manager, windows, winget, winget-cli
- Language: JavaScript
- Homepage:
- Size: 56.6 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Winget List Handler
## 🔎 About
This project automates the process of reinstalling applications after formatting the system. Using **winget**, it allows you to generate a report of all installed applications on Windows (including those **not** installed via winget) and facilitates the automatic reinstallation of compatible apps.
Additionally, if some applications cannot be installed automatically, the project generates a report indicating which apps still need to be installed manually.
### 📌 How does it work?
1️⃣ **Before formatting**: generate reference files with a list of installed applications.
2️⃣ **After formatting**: use the automation to reinstall the apps.---
🚀 How to use
### ⚙️ Prerequisites
- 
- 
- ---
### 📌 Step by step
#### 1️⃣ Generate reports before formatting
Before formatting, run the command to generate reference files for installed applications:
```sh
npm install -y
node index.js --generate-files-only
```This will create two files in the project's root directory:
📄 **`apps-com-pacotes.json`** → Contains only applications that can be automatically reinstalled via winget.
📄 **`apps-prejudicados.json`** → Lists applications that **cannot** be reinstalled automatically, either due to lack of support in winget or issues with the `winget list` command output.
Copy the `arquivos_gerados` folder (or the entire project) to a safe location before formatting the system.
---
#### 2️⃣ Reinstall applications after formatting
Before proceeding, ensure that **Node.js** and **NPM** are installed on the system. If not, download and install them from the official website:
🔗 [Node.js Official](https://nodejs.org/)
After formatting the system, retrieve the `arquivos_gerados` directory and place it in the project root. Then, run one of the three commands:
- **Installs apps one by one**
The packages will be installed **one at a time** synchronously.
```sh
node index.js --consume-file-only
```- **Installs 5 apps simultaneously in a queue**
When one installation finishes, another from the queue starts.
```sh
node index.js --consume-file-only --async
```- **Allows you to define how many apps can be installed simultaneously**
```sh
node index.js --consume-file-only --async-concurrency=
```📌 **Tips:**
- Synchronous installation is slower but consumes less RAM, CPU, and storage write cycles.
- Asynchronous installation is faster, but the number of packages installed simultaneously can impact overall system performance and may be limited by the system's default storage write speed.
- The default for asynchronous installations is **5 simultaneous packages**.This process may take time, as it depends on package server speeds and your hardware capabilities.