2024-07-02 11:40:49 +02:00
|
|
|
param (
|
|
|
|
[string]$script
|
|
|
|
)
|
|
|
|
|
2024-10-06 17:46:11 +02:00
|
|
|
|
2024-07-02 11:40:49 +02:00
|
|
|
$fileName = "$script.bat"
|
|
|
|
$filePath = Join-Path -Path $env:TEMP -ChildPath $fileName
|
|
|
|
|
2024-10-06 17:46:11 +02:00
|
|
|
$baseUrl = "https://git.mylloon.fr/Anri/confOS/raw/branch/main"
|
|
|
|
|
|
|
|
if ($script -eq "windows11") {
|
|
|
|
$url = "$baseUrl/$fileName"
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
$url = "$baseUrl/windows/installers/$fileName"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-07-02 11:42:17 +02:00
|
|
|
Write-Host "Downloading $fileName..."
|
2024-07-02 11:40:49 +02:00
|
|
|
Invoke-WebRequest -Uri $url -OutFile $filePath
|
2024-07-02 12:06:36 +02:00
|
|
|
Start-Process $filePath -NoNewWindow -Wait;
|
2024-07-02 11:40:49 +02:00
|
|
|
|
|
|
|
Remove-Item -Path $filePath
|
|
|
|
exit
|