Files
setup-script/setupTmp.ps1

118 lines
5.3 KiB
PowerShell

$tmpPath = Join-Path $env:LOCALAPPDATA "Temp"
function DownloadFiles {
param (
[string] $Type
)
switch ($Type) {
"Labo" {
$filesToDownload = @(
@{
Url = "https://winstars.net/files/version3/winstars_installer.exe" # Validated 07/11/23
FileName = "winstars_installer.exe"
},
@{
Url = "https://cosphilog.fr/tectoglob3d/Tectoglob3D-win32-ia32.zip" # Validated 07/11/23
FileName = "Tectoglob3D-win32-ia32.zip"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Sismolog.exe" # Validated 13/11/23
FileName = "Sismolog.exe"
},
@{
Url = "http://acces.ens-lyon.fr/acces/logiciels/applications/tectoglob/Tectoglob_11_complet.zip/at_download/file" # Validated 07/11/23
FileName = "Tectoglob_11_complet.zip"
},
@{
Url = "http://svt.janzac.free.fr/logiciels/respipoisson/respipoisson.exe" # Validated 07/11/23
FileName = "Respipoisson.exe"
},
@{
Url = "https://regressi.fr/zip/regressi-mpeg-setup.msi" # Replaced 07/11/23
FileName = "regressi-mpeg-setup.msi"
},
@{
Url = "http://labocharlemagne.free.fr/logiciels/regavi.zip" # Validated 07/11/23
FileName = "regavi.zip"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Radiochr_08.exe" # Validated 07/11/23
FileName = "Radiochr.exe"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Phylogene-Lycee-2021.zip" # Validated 13/11/23
FileName = "Phylogene-Lycee-2021.zip"
},
@{
Url = "http://philippe.cosentino.free.fr/productions/paleoterre/paleoterre_el32.zip" # Validated 07/11/23
FileName = "paleoterre_el32.zip"
},
@{
Url = "http://acces.ens-lyon.fr/logiciels/EduAnat2/Eduanat2%20Setup%202.0.0.exe" # Validated 07/11/23
FileName = "Eduanat2_Setup_2.0.0.exe"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Couvac.exe" # Validated 07/11/23
FileName = "Couvac.exe"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/ChemSketch.zip" # Validated 07/11/23
FileName = "ChemSketch.zip"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Anagene.zip" # Validated 13/11/23
FileName = "Anagene.zip"
} ,
@{
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 07/11/23
FileName = "O365ProPlusRetail.img"
}
)
}
"Info" {
$filesToDownload = @(
@{
Url = "https://education.lego.com/_/downloads/EV3_Classroom_Windows_1.5.3_Global.msi" # Validated 07/11/23
FileName = "EV3_Classroom_Windows_1.5.3_Global.msi"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/simulation.zip" # Validated 07/11/23
FileName = "simulation.zip"
},
@{
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/RobotProg.zip" # Validated 07/11/23
FileName = "RobotProg.zip"
},
@{
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 07/11/23
FileName = "O365ProPlusRetail.img"
}
)
}
"Laptop" {
$filesToDownload = @(
@{
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 07/11/23
FileName = "O365ProPlusRetail.img"
}
)
}
"Office" {
$filesToDownload = @(
@{
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 07/11/23
FileName = "O365ProPlusRetail.img"
}
)
}
default { Write-Host "Invalid selection." }
}
foreach ($fileInfo in $filesToDownload) {
$filePath = Join-Path $tmpPath $fileInfo.FileName
if (-not (Test-Path -Path $filePath -PathType Leaf)) {
Invoke-WebRequest -Uri $fileInfo.Url -OutFile $filePath
}
}
}