From 1ecc503f12c6693bc7fd382bb798ab738f5dc1e1 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Tue, 2 Jul 2024 11:40:49 +0200 Subject: [PATCH] runner --- README.md | 8 ++++++++ windows/installers/runner.ps1 | 19 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 windows/installers/runner.ps1 diff --git a/README.md b/README.md index baf8f74..81d8e97 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,14 @@ - Télécharger et lancer [windows11.bat](./windows11.bat) +### Mise à jour de certains programmes + +```batch +curl.exe "https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/installers/runner.ps1" | PowerShell -Command -Script "script" +``` + +Avec le paramètre `script` le programme à (ré-)installer + ## WSL (Arch) Tout d'abord, installer [ArchWSL](https://github.com/yuk7/ArchWSL/releases) diff --git a/windows/installers/runner.ps1 b/windows/installers/runner.ps1 new file mode 100644 index 0000000..fc84d2d --- /dev/null +++ b/windows/installers/runner.ps1 @@ -0,0 +1,19 @@ +param ( + [string]$script +) + +if (-not $script) { + Write-Host "No script found" + exit +} + +$fileName = "$script.bat" +$url = "https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/installers/$fileName" +$filePath = Join-Path -Path $env:TEMP -ChildPath $fileName + +Invoke-WebRequest -Uri $url -OutFile $filePath +& $filePath + +Remove-Item -Path $filePath + +exit