Suppose you want to run a binary on your Windows command line without navigating to the binary file’s directory. In that case, you can add the directory to your Windows path environment variable.

To do this, right-click on the Windows icon on your screen, then click on ‘System’.

After the About screen loads, click on “Advanced system settings.”

Click on ‘Environmental variables’ when the system properties dialog box appears.

Select ‘ Path ‘ in the User Variables section and click the edit button. A new dialog box will appear. You can either click ‘Browse’ to select the directory where the binary file is located or click ‘New’ to type in the directory manually. Once you’re done selecting or typing, click ‘OK’ on the current dialog and the two previous dialogs.

You may need to restart your command line or computer for the changes to take effect. After restarting, type the binary name in your command line to execute it; it should work without errors.

Categorized in:

Tagged in: