bugfix: allow PWSH for shortcut

This commit is contained in:
Baipyrus 2024-09-02 09:32:28 +02:00
parent 47541d9405
commit 5b7320e057

View File

@ -1,7 +1,14 @@
$startupDir = (Get-Location).Path
$destinationDir = "$env:LOCALAPPDATA\Programs"
$startmenuDir = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs"
$powershellPath = "$PSHOME\powershell.exe"
Write-Host "Detecting Powershell Executable..." -ForegroundColor Cyan
$powershellPath = "$PSHOME"
if (Test-Path "$powershellPath\pwsh.exe")
{ $powershellPath = "$powershellPath\pwsh.exe"
} else
{ $powershellPath = "$powershellPath\powershell.exe"
}
# Create program directory and relocate
Write-Host "Creating program directory in Userprofile..." -ForegroundColor Cyan