Fixed2
This commit is contained in:
@@ -70,7 +70,10 @@ function InstallZip {
|
|||||||
[bool] $createSubfolder = $false,
|
[bool] $createSubfolder = $false,
|
||||||
[string] $skipIf = $false
|
[string] $skipIf = $false
|
||||||
)
|
)
|
||||||
if (-not (Test-Path -Path $skipIf -PathType Container) -and $skipIf -ne $false) {
|
if ($skipIf -ne $false -and (Test-Path -Path $skipIf -PathType Container)) {
|
||||||
|
Write-Host "$app already installed."
|
||||||
|
}
|
||||||
|
} else {
|
||||||
$zipName = [System.IO.Path]::GetFileNameWithoutExtension($zip)
|
$zipName = [System.IO.Path]::GetFileNameWithoutExtension($zip)
|
||||||
Write-Host "Installing $zipName..."
|
Write-Host "Installing $zipName..."
|
||||||
$targetPath = $env:ProgramFiles
|
$targetPath = $env:ProgramFiles
|
||||||
@@ -90,8 +93,6 @@ function InstallZip {
|
|||||||
Move-Item -Path (Join-Path $env:ProgramFiles $zipName) -Destination (Join-Path $env:ProgramFiles $app)
|
Move-Item -Path (Join-Path $env:ProgramFiles $zipName) -Destination (Join-Path $env:ProgramFiles $app)
|
||||||
}
|
}
|
||||||
CreateShortcut -exe $(Join-Path -Path $env:ProgramFiles -ChildPath (Join-Path -Path $app -ChildPath $exe)) -app $app
|
CreateShortcut -exe $(Join-Path -Path $env:ProgramFiles -ChildPath (Join-Path -Path $app -ChildPath $exe)) -app $app
|
||||||
} else {
|
|
||||||
Write-Host "$app already installed."
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user