def GetChocolateyPath(): path = join( GetEnvironmentVar("ChocolateyInstall"), "bin", "choco.exe", ) return path if exists(path) else ""
def GetGitPath(): path = "" for p in GetEnvironmentVar("PATH").split(os.pathsep): if "\\Git\\" in p: path = join(p, "git.exe") return path if exists(path) else ""