mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 12:41:45 +00:00
bugfix: create local programs directory
This commit is contained in:
parent
3fd3b44fdc
commit
0e474e9429
@ -1,7 +1,13 @@
|
|||||||
$startupDir = (Get-Location).Path
|
$startupDir = (Get-Location).Path
|
||||||
$destinationDir = "$env:LOCALAPPDATA\Programs"
|
|
||||||
$startmenuDir = "$env:APPDATA\Microsoft\Windows\Start Menu\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
|
Write-Host "Detecting Powershell Executable..." -ForegroundColor Cyan
|
||||||
$powershellPath = "$PSHOME"
|
$powershellPath = "$PSHOME"
|
||||||
if (Test-Path "$powershellPath\pwsh.exe")
|
if (Test-Path "$powershellPath\pwsh.exe")
|
||||||
|
Loading…
Reference in New Issue
Block a user