Skip to content

Windows PATH

Southclaws edited this page Mar 28, 2018 · 2 revisions

Operating systems have "global variables" just like Pawn scripts. One of these variables is called PATH and is present on Windows, Linux and Mac. The purpose of this variable is to store a list of directory paths that contain "executable" files (.exe files on Windows). This allows a user to run any of the executable files that live in the directories in PATH.

Here's my Path:

Imgur

You can see C:\Windows\System32 is in PATH and in that folder is notepad.exe - hence, I can type notepad into any PowerShell/Command Prompt window and notepad.exe will execute because it's contained within a directory that is present on PATH.

This is how you execute sampctl. Scoop and the Installer do this automatically, but if you want to install manually for any reason, follow this guide.

Step 1

Search for "Environment Variables" in the Start menu:

(Similar on Windows 7 or XP, but I don't have screenshots for those systems)

Imgur

Step 2

Click "Environment Variables" button at the bottom:

Imgur

Step 3

Locate the Path variable in the User variables section:

Imgur

Step 4

Click New and enter C:\sampctl\:

Imgur

Step 5

Done! "Ok" your way out of all the open settings windows.

If you have any PowerShell or Command Prompt windows already open, you will need to close them and re-open in order for the PATH changes to take effect.

Clone this wiki locally