Created
November 17, 2019 14:35
-
-
Save roessland/a35ace3d995bfbe4730b94537018b9d1 to your computer and use it in GitHub Desktop.
Add git.exe to path without adding sh.exe and bash.exe using PowerShell
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
$a = Get-Item 'C:\Program Files\Git\bin\git.exe' | |
$b = New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\$($a.BaseName).exe" | |
$b.SetValue("", $a.FullName) | |
$b.SetValue("Path", $a.DirectoryName + '\') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment