@echo OFF
:: Programs installed via Chocolatey may sometimes have version numbers
:: in the folder names.
::
:: So the path to executables may change during auto-updates.
::
:: This can set cURL and HTML Tidy as a user Environment Variable at system
:: startup or after every scheduled auto-update.
pushd "%CHOCOLATEYINSTALL%\lib\curl\tools\curl*\bin"
setx CURL_EXE "%CD%\curl.exe"
popd
pushd "%CHOCOLATEYINSTALL%\lib\html-tidy\tools\tidy*\bin"
setx TIDY_EXE "%CD%\tidy.exe"
popd
REM Run this from the commandline to check the current version.
:: "%CURL_EXE%" --version
REM Or you can do the same in PowerShell...
:: $CurlDir = Get-ChildItem "$Env:ChocolateyInstall\lib\curl\tools\curl*\bin"
:: [System.Environment]::SetEnvironmentVariable('CURL_EXE', "$CurlDir\curl.exe", [System.EnvironmentVariableTarget]::User)
:: # Start-Process -FilePath "$Env:CURL_EXE" -ArgumentList "--version" -NoNewWindow -Wait
Comments
0 B
|👍
/👎