Created
August 31, 2023 01:55
-
-
Save sengiv/6eaf57113eb275403cb04cefdfa27619 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# Get the current PATH | |
$currentPath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).path | |
# Your MSBuild path | |
$msbuildPath = "C:\Program Files\Microsoft Visual Studio\2022\Preview\MSBuild\Current\Bin" | |
# Create a new PATH | |
$newPath = $currentPath + ";" + $msbuildPath | |
# Set the new PATH | |
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