Fix ZipSetup
This commit is contained in:
@@ -32,12 +32,16 @@ function InstallExe {
|
|||||||
function InstallZipSetup {
|
function InstallZipSetup {
|
||||||
param (
|
param (
|
||||||
[string] $zip,
|
[string] $zip,
|
||||||
[string] $exe
|
[string] $exe,
|
||||||
|
[bool] $createSubfolder = $false
|
||||||
)
|
)
|
||||||
$zipName = [System.IO.Path]::GetFileNameWithoutExtension($zip)
|
$zipName = [System.IO.Path]::GetFileNameWithoutExtension($zip)
|
||||||
Write-Host "Installing $zipName..."
|
Write-Host "Installing $zipName..."
|
||||||
$expPath = Join-Path $tmpPath $zipName
|
$expPath = Join-Path $tmpPath
|
||||||
Write-Host "ExePath: $expPath"
|
if ($createSubfolder) {
|
||||||
|
$expPath = Join-Path $expPath $zipName
|
||||||
|
}
|
||||||
|
Write-Host "ExpandPath: $expPath"
|
||||||
Write-Host "ZipPath: $(Join-Path $tmpPath $zip)"
|
Write-Host "ZipPath: $(Join-Path $tmpPath $zip)"
|
||||||
Write-Host "SetupPath: $(Join-Path -Path $expPath -ChildPath (Join-Path -Path $zipName -ChildPath $exe))"
|
Write-Host "SetupPath: $(Join-Path -Path $expPath -ChildPath (Join-Path -Path $zipName -ChildPath $exe))"
|
||||||
Expand-Archive -Path (Join-Path $tmpPath $zip) -DestinationPath $expPath -Force
|
Expand-Archive -Path (Join-Path $tmpPath $zip) -DestinationPath $expPath -Force
|
||||||
@@ -115,8 +119,8 @@ function InstallApps {
|
|||||||
InstallZip -zip "paleoterre_el32.zip" -exe "paleoTerre.exe" -app "PaleoTerre"
|
InstallZip -zip "paleoterre_el32.zip" -exe "paleoTerre.exe" -app "PaleoTerre"
|
||||||
InstallExeSetup -app "Eduanat2_Setup_2.0.0.exe"
|
InstallExeSetup -app "Eduanat2_Setup_2.0.0.exe"
|
||||||
InstallZip -zip "couvac_exe.zip" -exe "couvac.exe" -app "Couvac" -createSubfolder $true
|
InstallZip -zip "couvac_exe.zip" -exe "couvac.exe" -app "Couvac" -createSubfolder $true
|
||||||
InstallZipSetup -zip "ACDLabs202311_ChemSketch_FInstall.zip" -exe "setup.exe"
|
InstallZipSetup -zip "ACDLabs202311_ChemSketch_FInstall.zip" -exe "setup.exe" -createSubfolder $true
|
||||||
InstallZipSetup -zip "Anagene.zip" -exe "Anagene/Setup.exe"
|
InstallZipSetup -zip "Anagene.zip" -exe "Setup.exe"
|
||||||
}
|
}
|
||||||
"Info" {
|
"Info" {
|
||||||
InstallZip -zip "simulation.zip" -exe "simulation.exe" -app "Simulation Domotique"
|
InstallZip -zip "simulation.zip" -exe "simulation.exe" -app "Simulation Domotique"
|
||||||
|
|||||||
Reference in New Issue
Block a user