Added hash check to setupTmp
Fixed issue with custom apps in choco
This commit is contained in:
76
setupTmp.ps1
76
setupTmp.ps1
@@ -9,100 +9,119 @@ function DownloadFiles {
|
||||
"Labo" {
|
||||
$filesToDownload = @(
|
||||
@{
|
||||
Url = "https://winstars.net/files/version3/winstars_installer.exe" # Validated 07/11/23
|
||||
Url = "https://winstars.net/files/version3/winstars_installer.exe" # Validated 15/11/23
|
||||
FileName = "winstars_installer.exe"
|
||||
Hash = "f3e97e1373ab84eb4c707f04fca78abbcb0ed289"
|
||||
},
|
||||
#@{
|
||||
# Url = "https://cosphilog.fr/tectoglob3d/Tectoglob3D-win32-ia32.zip"
|
||||
# FileName = "Tectoglob3D-win32-ia32.zip"
|
||||
#},
|
||||
#@{
|
||||
# Url = "http://acces.ens-lyon.fr/acces/logiciels/applications/tectoglob/Tectoglob_11_complet.zip/at_download/file"
|
||||
# FileName = "Tectoglob_11_complet.zip"
|
||||
#},
|
||||
@{
|
||||
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
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Sismolog.exe"
|
||||
FileName = "Sismolog.exe"
|
||||
Hash = "2d57ac0dd260e33194fbd53a91ab707d273bc80d"
|
||||
},
|
||||
@{
|
||||
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
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/respipoisson.exe"
|
||||
FileName = "Respipoisson.exe"
|
||||
Hash = "5ccbb52480f8a867d5c836d3c14360eb2ed66901"
|
||||
},
|
||||
@{
|
||||
Url = "https://regressi.fr/zip/regressi-mpeg-setup.msi" # Replaced 07/11/23
|
||||
Url = "https://regressi.fr/zip/regressi-mpeg-setup.msi" # Validated 15/11/23
|
||||
FileName = "regressi-mpeg-setup.msi"
|
||||
Hash = "eb18da510c842690042d5294d55b8d3d032b1d80"
|
||||
},
|
||||
@{
|
||||
Url = "http://labocharlemagne.free.fr/logiciels/regavi.zip" # Validated 07/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/regavi.zip"
|
||||
FileName = "regavi.zip"
|
||||
Hash = "dbd4ab84a28d4b387ba8abcd7a32d6eb109e638f"
|
||||
},
|
||||
@{
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Radiochr_08.exe" # Validated 07/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Radiochr_08.exe"
|
||||
FileName = "Radiochr.exe"
|
||||
Hash = "8452ca0ca30c4f17d60e5cc7f721624244e51290"
|
||||
},
|
||||
@{
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Phylogene-Lycee-2021.zip" # Validated 13/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Phylogene-Lycee-2021.zip"
|
||||
FileName = "Phylogene-Lycee-2021.zip"
|
||||
Hash = "39611185a4b788722989b8811adc374928090501"
|
||||
},
|
||||
@{
|
||||
Url = "http://philippe.cosentino.free.fr/productions/paleoterre/paleoterre_el32.zip" # Validated 07/11/23
|
||||
Url = "http://philippe.cosentino.free.fr/productions/paleoterre/paleoterre_el32.zip" # Validated 15/11/23
|
||||
FileName = "paleoterre_el32.zip"
|
||||
Hash = "ee282e54d7c1e682fb6b219bcc7fac395f2984e3"
|
||||
},
|
||||
@{
|
||||
Url = "http://acces.ens-lyon.fr/logiciels/EduAnat2/Eduanat2%20Setup%202.0.0.exe" # Validated 07/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Eduanat2_Setup_2.0.0.exe"
|
||||
FileName = "Eduanat2_Setup_2.0.0.exe"
|
||||
Hash = "a423589d43a60432efb012147c2540d6e9dc9f78"
|
||||
},
|
||||
@{
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Couvac.exe" # Validated 07/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Couvac.exe"
|
||||
FileName = "Couvac.exe"
|
||||
Hash = "298b1337e914c56bb96ce358dbc9e4d38371aca4"
|
||||
},
|
||||
@{
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/ChemSketch.zip" # Validated 07/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/ChemSketch.zip"
|
||||
FileName = "ChemSketch.zip"
|
||||
Hash = "5c7fce37f60f613bad44f6515d789d3aaf672dc6"
|
||||
},
|
||||
@{
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Anagene.zip" # Validated 13/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/Anagene.zip"
|
||||
FileName = "Anagene.zip"
|
||||
Hash = "17d6a6fd898644b9b3771affa95842f0992d19cf"
|
||||
} ,
|
||||
@{
|
||||
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 07/11/23
|
||||
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 15/11/23
|
||||
FileName = "O365ProPlusRetail.img"
|
||||
Hash = "6d603e00560bb9619453d1fa1c1a5984850db6d2"
|
||||
}
|
||||
)
|
||||
}
|
||||
"Info" {
|
||||
$filesToDownload = @(
|
||||
@{
|
||||
Url = "https://education.lego.com/_/downloads/EV3_Classroom_Windows_1.5.3_Global.msi" # Validated 07/11/23
|
||||
Url = "https://education.lego.com/_/downloads/EV3_Classroom_Windows_1.5.3_Global.msi" # Validated 15/11/23
|
||||
FileName = "EV3_Classroom_Windows_1.5.3_Global.msi"
|
||||
Hash = "70ed2ab3f18f157db6556f88e99f8575a2498379"
|
||||
},
|
||||
@{
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/simulation.zip" # Validated 07/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/simulation.zip"
|
||||
FileName = "simulation.zip"
|
||||
Hash = "2327c15c390d53d4d5929a1a53acea566c8fba42"
|
||||
},
|
||||
@{
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/RobotProg.zip" # Validated 07/11/23
|
||||
Url = "https://git.justw.tf/Lightemerald/setup-script/raw/branch/main/Setup%20files/RobotProg.zip"
|
||||
FileName = "RobotProg.zip"
|
||||
Hash = "5ed0962c5aefb5738d4408bb475655ea02e96dbb"
|
||||
},
|
||||
@{
|
||||
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 07/11/23
|
||||
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 15/11/23
|
||||
FileName = "O365ProPlusRetail.img"
|
||||
Hash = "6d603e00560bb9619453d1fa1c1a5984850db6d2"
|
||||
}
|
||||
)
|
||||
}
|
||||
"Laptop" {
|
||||
$filesToDownload = @(
|
||||
@{
|
||||
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 07/11/23
|
||||
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 15/11/23
|
||||
FileName = "O365ProPlusRetail.img"
|
||||
Hash = "6d603e00560bb9619453d1fa1c1a5984850db6d2"
|
||||
}
|
||||
)
|
||||
}
|
||||
"Office" {
|
||||
$filesToDownload = @(
|
||||
@{
|
||||
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 07/11/23
|
||||
Url = "https://officecdn.microsoft.com/db/492350f6-3a01-4f97-b9c0-c7c6ddf67d60/media/fr-fr/O365ProPlusRetail.img" # Validated 15/11/23
|
||||
FileName = "O365ProPlusRetail.img"
|
||||
Hash = "6d603e00560bb9619453d1fa1c1a5984850db6d2"
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -114,5 +133,8 @@ function DownloadFiles {
|
||||
if (-not (Test-Path -Path $filePath -PathType Leaf)) {
|
||||
Invoke-WebRequest -Uri $fileInfo.Url -OutFile $filePath
|
||||
}
|
||||
if ((Get-FileHash -Path $filePath).Hash -ne $fileInfo.Hash) {
|
||||
Invoke-WebRequest -Uri $fileInfo.Url -OutFile $filePath
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user