get, append and set to PATH for cli

This commit is contained in:
Baipyrus 2024-09-05 19:37:54 +02:00
parent bb24d90592
commit ece139671d

View File

@ -57,6 +57,11 @@ $assetPath = "$programPath\assets\ICON_Enabled.ico"
DownloadFile -url https://raw.githubusercontent.com/Baipyrus/ProxySwitcher/main/assets/ICON_Disabled.ico
DownloadFile -url https://raw.githubusercontent.com/Baipyrus/ProxySwitcher/main/assets/ICON_Enabled.ico
# Add program to PATH for cli application
$userpath = [System.Environment]::GetEnvironmentVariable("PATH", "User")
$userpath = $userpath + ";$programDir"
[System.Environment]::SetEnvironmentVariable("PATH", $userpath, "User")
# Create Startmenu Shortcut
Write-Host "Creating shortcuts for easy access..." -ForegroundColor Cyan
$assetsDir = "assets"