Created
June 1, 2020 11:09
-
-
Save tuyendq/f1b53cafd135b21b0a7be8b29d10ca5a to your computer and use it in GitHub Desktop.
Powershell - Path environment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add PERMENANT entry to %PATH% environment variable - Add to Registry | |
$addToPath = "C:\Program Files\Amazon\AWSCLIV2" | |
$currentPath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path | |
$newPath = "$currentPath;$addToPath" | |
Set-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH -Value $newPath |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment