Update SetupScriptLabo.ps1

This commit is contained in:
2023-10-23 13:02:57 +00:00
parent 7162a70f65
commit 60f126e7c8

View File

@@ -172,14 +172,14 @@ function InstallExe {
[string] $app
)
$appName = [System.IO.Path]::GetFileNameWithoutExtension($app)
Write-Host "Installing $appName..."
$targetPath = Join-Path $env:ProgramFiles $appName
if (-not (Test-Path -Path $targetPath -PathType Container)) {
New-Item -Path $targetPath -ItemType Directory
}
$appFilePath = Join-Path $tmpPath $app
Copy-Item -Path $appFilePath -Destination $targetPath -Force
createShortcut -exe $appFilePath -app $appName
Copy-Item -Path (Join-Path $tmpPath $app) -Destination $targetPath -Force
createShortcut -exe (Join-Path $targetPath $app) -app $appName
}
function InstallZipSetup {