mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 04:31:45 +00:00
conditionally add to user path on install
This commit is contained in:
parent
da6597f8fb
commit
836a1de27e
@ -53,8 +53,10 @@ if ($isRelease)
|
||||
|
||||
# Add program to PATH for cli application
|
||||
$userpath = [System.Environment]::GetEnvironmentVariable("PATH", "User")
|
||||
if ($userpath.Split(";") -notcontains $programPath) {
|
||||
$userpath = $userpath + ";$programPath"
|
||||
[System.Environment]::SetEnvironmentVariable("PATH", $userpath, "User")
|
||||
}
|
||||
|
||||
# Create Startmenu Shortcut
|
||||
Write-Host "Creating shortcuts for easy access..." -ForegroundColor Cyan
|
||||
|
Loading…
Reference in New Issue
Block a user