From d07c178edf5425e14bcc59e808b331b069478c9b Mon Sep 17 00:00:00 2001 From: Lightemerald Date: Mon, 13 Nov 2023 12:38:34 +0100 Subject: [PATCH] Fix --- setupApps.ps1 | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/setupApps.ps1 b/setupApps.ps1 index 352f89b..0a96956 100644 --- a/setupApps.ps1 +++ b/setupApps.ps1 @@ -48,6 +48,21 @@ function InstallZipSetup { Start-Process -FilePath $(Join-Path -Path $expPath -ChildPath (Join-Path -Path $zipName -ChildPath $exe)) -ArgumentList "/allusers /s" -Wait } +function InstallZipMsi { + param ( + [string] $zip, + [string] $msi + ) + $zipName = [System.IO.Path]::GetFileNameWithoutExtension($zip) + Write-Host "Installing $zipName..." + $expPath = Join-Path $tmpPath + Write-Host "ExpandPath: $expPath" + Write-Host "ZipPath: $(Join-Path $tmpPath $zip)" + Write-Host "SetupPath: $(Join-Path -Path $expPath -ChildPath (Join-Path -Path $zipName -ChildPath $msi))" + Expand-Archive -Path (Join-Path $tmpPath $zip) -DestinationPath $expPath -Force + InstallMsi -app $(Join-Path -Path $expPath -ChildPath (Join-Path -Path $zipName -ChildPath $msi)) +} + function InstallZip { param ( [string] $zip, @@ -119,8 +134,8 @@ function InstallApps { InstallZip -zip "paleoterre_el32.zip" -exe "paleoTerre.exe" -app "PaleoTerre" InstallExeSetup -app "Eduanat2_Setup_2.0.0.exe" InstallZip -zip "couvac_exe.zip" -exe "couvac.exe" -app "Couvac" -createSubfolder $true - InstallZipSetup -zip "ACDLabs202311_ChemSketch_FInstall.zip" -exe "setup.exe" -createSubfolder $true - InstallZipSetup -zip "Anagene.zip" -exe "Setup.exe" + InstallZipSetup -zip "ACDLabs202311_ChemSketch_FInstall.zip" -exe "setup.exe" + InstallZipMsi -zip "Anagene.zip" -msi "Anagène 2.msi" } "Info" { InstallZip -zip "simulation.zip" -exe "simulation.exe" -app "Simulation Domotique"