From 0e474e94296b1743848b6c404497796a9f99758a Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Mon, 2 Sep 2024 16:43:26 +0200 Subject: [PATCH] bugfix: create local programs directory --- install.ps1 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/install.ps1 b/install.ps1 index 736d2d8..bdf7600 100644 --- a/install.ps1 +++ b/install.ps1 @@ -1,7 +1,13 @@ $startupDir = (Get-Location).Path -$destinationDir = "$env:LOCALAPPDATA\Programs" $startmenuDir = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs" +# Create Local Program Directory if not exists +$destinationDir = "$env:LOCALAPPDATA\Programs" +if (-not (Test-Path $destinationDir)) +{ New-Item -ItemType Directory -Path $destinationDir | Out-Null +} + +# Detect Powershell Version and Path Write-Host "Detecting Powershell Executable..." -ForegroundColor Cyan $powershellPath = "$PSHOME" if (Test-Path "$powershellPath\pwsh.exe")