Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
# ============================================================================== # VARIABLES À MODIFIER # ============================================================================== # Indiquez ici l'ID exact de l'application (trouvé via 'winget search') $AppID = "7zip.7zip" # ============================================================================== # SCRIPT (Ne pas modifier la suite normalement) # ============================================================================== try { Write-Host "Recherche de l'exécutable Winget..." # Recherche du chemin de Winget (Desktop App Installer) $WingetPath = Resolve-Path "C:\Program Files\WindowsApps\Microsoft.DesktopAppInstaller_*_x64__8wekyb3d8bbwe\winget.exe" | Select-Object -ExpandProperty Path -First 1 if (-not $WingetPath) { Write-Error "Winget n'a pas été trouvé sur ce système." exit 1 } Write-Host "Winget trouvé : $WingetPath" Write-Host "Début de l'installation de $AppID..." # Exécution de la commande d'installation # --exact : Correspondance stricte de l'ID # --silent : Installation silencieuse (sans interface) # --accept-... : Accepte automatiquement les conditions d'utilisation # --scope machine : Installe pour tous les utilisateurs du PC $process = Start-Process -FilePath $WingetPath -ArgumentList "install --id `"$AppID`" --exact --silent --accept-package-agreements --accept-source-agreements --scope machine" -Wait -NoNewWindow -PassThru Write-Host "Installation terminée avec le code de retour : $($process.ExitCode)" exit $process.ExitCode } catch { Write-Error "Une erreur est survenue : $_" exit 1 }
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)