run windows11 installer without the need to download the bat manually
This commit is contained in:
parent
de76261bf4
commit
2fc0c04200
2 changed files with 16 additions and 3 deletions
|
@ -4,7 +4,11 @@
|
|||
|
||||
## Windows 11
|
||||
|
||||
- Télécharger et lancer [windows11.bat](./windows11.bat)
|
||||
> Dans l'invite de commande `cmd`
|
||||
|
||||
```batch
|
||||
PowerShell -Command "Invoke-Expression """"& { $(Invoke-WebRequest -UseBasicParsing 'https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/installers/runner.ps1') } -Script windows11"""""
|
||||
```
|
||||
|
||||
### Mise à jour de certains programmes
|
||||
|
||||
|
|
|
@ -2,14 +2,23 @@ param (
|
|||
[string]$script
|
||||
)
|
||||
|
||||
|
||||
$fileName = "$script.bat"
|
||||
$url = "https://git.mylloon.fr/Anri/confOS/raw/branch/main/windows/installers/$fileName"
|
||||
$filePath = Join-Path -Path $env:TEMP -ChildPath $fileName
|
||||
|
||||
$baseUrl = "https://git.mylloon.fr/Anri/confOS/raw/branch/main"
|
||||
|
||||
if ($script -eq "windows11") {
|
||||
$url = "$baseUrl/$fileName"
|
||||
}
|
||||
else {
|
||||
$url = "$baseUrl/windows/installers/$fileName"
|
||||
}
|
||||
|
||||
|
||||
Write-Host "Downloading $fileName..."
|
||||
Invoke-WebRequest -Uri $url -OutFile $filePath
|
||||
Start-Process $filePath -NoNewWindow -Wait;
|
||||
|
||||
Remove-Item -Path $filePath
|
||||
|
||||
exit
|
||||
|
|
Loading…
Reference in a new issue