Skip to content

Adding To Path

radj307 edited this page Jan 24, 2022 · 2 revisions

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.

Windows

There are a few ways to accomplish this; I'll be covering the most common.

Using the Windows GUI

  1. Press Win+R to open the run dialog, then paste the following and press enter:
    rundll32.exe sysdm.cpl,EditEnvironmentVariables
  2. 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 put X:\bin on your path.

Using a PowerShell Profile

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.

Linux

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:

  1. 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.
  1. Use echo "export PATH="<DIRECTORY>:$PATH"" >> <SHELL_CFG_FILE>
    Make sure to replace <DIRECTORY> with the directory where the RCON program is located.
Clone this wiki locally