-
Notifications
You must be signed in to change notification settings - Fork 10
Adding To Path
This allows you to call ARRCON.exe
from anywhere you open a terminal, or from scripts, without having to specify the absolute filepath.
Note: If you already had a terminal open, you will have to close & re-open it to update its environment.
There are a few ways to accomplish this; I'll be covering the most common.
- Press Win+R to open the run dialog, then paste the following and press enter:
rundll32.exe sysdm.cpl,EditEnvironmentVariables
- Under "User variables for ..." select Path, then click Edit... -> New & paste the path to the directory containing
ARRCON.exe
For example, if you placed the executable here:X:\bin\ARRCON.exe
, you would putX:\bin
on your path.
You can export an updated PATH variable by using your PowerShell Profile.
This also applies to PowerShell Core running on platforms other than Windows, but I don't really know why you'd do that.
First, get the location of your profile by using this command: echo $PROFILE
Then open the file in a text editor of your choice, and add this line:
$env:Path += ";<DIRECTORY>"
Replace <DIRECTORY>
with the absolute path of the directory where ARRCON is located.
I'd recommend just placing the executable somewhere that is already on your path, such as /usr/local/bin
as modifying the path permanently requires modifying the shell configuration files.
If you want to anyway:
- Choose whether you want all users to be able to use the program, or just your current user.
- Current User:
Use~/.bashrc
for <SHELL_CFG_FILE> in the command below. - All Users:
Use/etc/environment
,/etc/profile
, or/etc/bash.bashrc
for <SHELL_CFG_FILE> in the command below.
- Use
echo "export PATH="<DIRECTORY>:$PATH"" >> <SHELL_CFG_FILE>
Make sure to replace<DIRECTORY>
with the directory where the RCON program is located.