问题
When I try run make from cmd-console on Windows, it runs Turbo Delphi's make.exe but I need MSYS's make.exe. There is no mention about Turbo Delphi in %path% variable, maybe I can change it to MSYS in registry? Please, help.
回答1:
The path is in the registry but usually you edit through this interface:
- Go to
Control Panel->System->System settings->Environment Variables. - Scroll down in system variables until you find
PATH. - Click edit and change accordingly.
- BE SURE to include a semicolon at the end of the previous as that is the delimiter, i.e.
c:\path;c:\path2 - Launch a new console for the settings to take effect.
回答2:
I had issues for a whilst not getting Terraform commands to run unless I was in the directory of the exe, even though I set the path correctly.
For anyone else finding this issue, I fixed it by moving the environment variable higher than others!
回答3:
here I'm providing solution to setup terraform enviroment variable in windows to beginners.
- Download the terraform package from portal either 32/64 bit version.
- make a folder in C drive in program files if its 32 bit package you have to create folder inside on programs(x86) folder or else inside programs(64 bit) folder.
- Extract a downloaded file in this location or copy terraform.exe file into this folder. copy this path location like C:\Programfile\terraform\
- Then got to Control Panel -> System -> System settings -> Environment Variables
Open system variables, select the path > edit > new > place the terraform.exe file location like > C:\Programfile\terraform\
and Save it.
- Open new terminal and now check the terraform.
回答4:
Why don't you create a bat file makedos.bat containing the following line?
c:\DOS\make.exe %1 %2 %5
and put it in C:\DOS (or C:\Windowsè or make sure that it is in your %path%)
You can run from cmd, SET and it displays all environment variables, including PATH.
In registry you can find environment variables under:
HKEY_CURRENT_USER\EnvironmentHKEY_CURRENT_USER\Volatile EnvironmentHKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment
回答5:
Or you can just run power-shell command to append extra folder to the existing path:
$env:Path += ";C:\temp\terraform"
来源:https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows