Merge pull request #8 from Baipyrus/proxyswitcher-cli

Add ProxySwitcher As CLI Via PATH
This commit is contained in:
Baipyrus 2024-09-05 22:18:51 +02:00 committed by GitHub
commit 1ad29b5ec6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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_Disabled.ico
DownloadFile -url https://raw.githubusercontent.com/Baipyrus/ProxySwitcher/main/assets/ICON_Enabled.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 # Create Startmenu Shortcut
Write-Host "Creating shortcuts for easy access..." -ForegroundColor Cyan Write-Host "Creating shortcuts for easy access..." -ForegroundColor Cyan
$assetsDir = "assets" $assetsDir = "assets"