To run a command-line app by name, add the folder containing its executable to PATH. For most installations, open Windows’ Environment Variables dialog, add the folder to your User Path, save, and open a new terminal. Use a temporary shell change to test without making a permanent edit.
What PATH does—and what to add
PATH is a list of folders Windows searches when you enter a command. Windows separates those folders with semicolons. Add the directory that contains the app’s executable—not the executable filename itself. For example, if the file is C:ToolsMyAppmyapp.exe, add C:ToolsMyApp.
As an Amazon Associate I earn from qualifying purchases.
Use the User PATH when the app is for your Windows account. Use the System PATH only when it should be available to all users; changing it may require administrator access. Microsoft documents both scopes through the Environment Variables dialog and the PowerShell environment variables documentation.
Add a folder permanently in Windows
- Search Windows for Edit the system environment variables and open it. Alternatively, go to System > Advanced System Settings > Advanced > Environment Variables.
- Under User variables, select Path, then choose Edit. This is the usual choice for an app installed for your account.
- Select New and enter the full path to the folder containing the command’s executable, such as
C:ToolsMyApp. Do not enter the executable filename or add quotation marks around the folder. - Confirm with OK in each open dialog to save the change.
- Open a new Command Prompt or PowerShell window and try the command, for example
myapp --version. Replace it with the app’s actual command and a supported test argument.
Choose Path under System variables instead only if all users need the command. Be careful when editing the machine-wide value.
#1 Best Overall
- 14" diagonal, 1366x768 resolution, HD BrightView LED, Glossy NON-TOUCH Display
Choose the right method for your situation
| Method | Persistence and scope | Use it for | Important caution |
|---|---|---|---|
| Environment Variables dialog | Persistent User or System value | The normal way to add an installed CLI | New processes must inherit the saved value. |
PowerShell $env:Path |
Current PowerShell process and its children | A quick test or temporary session | It does not persist after that PowerShell process ends. |
Command Prompt set PATH=... |
Current cmd process and its children |
A quick test in Command Prompt | It does not persist or update other open shells. |
setx |
Future command windows | Some simple persistent environment-variable changes | Risky for appending to an existing PATH; expansion and a 1024-character limit can damage it. |
| App execution alias | App-specific alias managed by Windows | Supported packaged apps such as Windows Terminal | Enable the alias; do not edit protected package files. |
| App Paths registration | Application discovery through Windows Shell registration | Developers deploying desktop applications | It is not a general replacement for PATH for command-line tools. |
Test a temporary PATH change
PowerShell
Append the app folder to PATH for the current PowerShell process, then run the command:
$env:Path += ";C:ToolsMyApp"
myapp --version
Change the sample folder and command to match your installation. PowerShell’s environment-variable provider exposes process values through $Env:...; the update applies to that PowerShell session and child processes, not other terminals or future sessions. See Microsoft’s environment variables documentation.
Command Prompt
In the current Command Prompt window, run:
set PATH=%PATH%;C:ToolsMyApp
Then try the app’s command in that same window. This changes only that cmd process and its children; it does not save a User or System PATH value.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Rank #2
- 256 GB SSD of storage.
- Multitasking is easy with 16GB of RAM
- Equipped with a blazing fast Core i5 2.00 GHz processor.
Why not use setx to append to PATH?
A command such as setx PATH "%PATH%;C:ToolsMyApp" is a risky way to modify an existing PATH. Microsoft’s setx documentation warns that changes are available only in future command windows, that variable references are expanded when the value is written, and that assignments are limited to 1024 characters. If the resulting value exceeds that limit, it can be cropped and overwrite part of the existing PATH. Use the Environment Variables editor for the usual persistent change.
If the command still is not found
- Verify the folder and executable: Check that the PATH entry is the directory that actually contains the executable, and confirm the command’s exact filename or documented launcher name. Some apps do not install a command-line launcher.
- Start a new terminal: A running process keeps the environment it inherited when it started. A saved change will not rewrite the PATH in an already-open Command Prompt or PowerShell window. Microsoft explains process environment inheritance in its environment variables documentation.
- Inspect the current value: In PowerShell, run
$env:Path. In Command Prompt, runecho %PATH%orset PATH. Look for the directory you added and check for a typo. - Consider command resolution: In PowerShell, a script or command may be affected by command resolution or script execution policy rather than PATH. Do not weaken execution policy as a PATH fix; see Microsoft’s execution policies documentation.
Windows Terminal and app execution aliases
If the command you want is wt for Windows Terminal, enable its app execution alias instead of adding a protected package folder to PATH. Open Windows Settings and search for Manage app execution aliases; enable the alias for Windows Terminal. Microsoft’s Windows Terminal command-line arguments documentation specifies this approach for wt.exe and says to verify that %LOCALAPPDATA%MicrosoftWindowsApps is on PATH. Do not change C:Program FilesWindowsApps.
App execution aliases are distinct from ordinary CLI folders: Windows manages them through Settings. If the alias is enabled but wt still is not recognized, inspect the current PATH and open a new terminal.
Rank #3
- WINDOWS 11 | STABLE PERFORMANCE: Powered by Intel Celeron N4020 processor and Windows 11 system, this laptop delivers stable performance for everyday computing tasks. It supports web browsing, online learning, document editing, email communication, and basic office work with optimized power efficiency, providing a practical and reliable experience for essential daily use for daily use.
- 15.6” FHD IPS DISPLAY: Features a 15.6-inch Full HD IPS display with narrow bezels, offering wider viewing angles and clearer image details compared to standard panels. The improved screen-to-body ratio enhances visual experience for study, reading, document work, and video playback, making it suitable for both productivity and entertainment use.
- 4GB DDR4 + 128GB eMMC STORAGE: Equipped with 4GB DDR4 memory and 128GB eMMC storage for everyday basics such as browsing, documents, email, and online learning platforms. The built-in TF card slot supports storage expansion up to 1TB, giving you more flexibility for files, photos, videos, and daily documents. TF card not included.
- CONNECTIVITY & PORTS: Includes 1× TF card slot, 2× USB 3.2 Gen1 ports, and 2× full-featured Type-C ports (USB 3.2 Gen1). The Type-C ports support data transfer, charging, and video output, enabling flexible connection with external devices such as monitors, storage, and peripherals for daily work and study use.
- LIGHTWEIGHT DESIGN | ONLINE COMMUNICATION: Designed with a slim, portable profile, this laptop is easy to carry for school, commuting, and travel. A built-in 1MP front camera supports online classes, video meetings, remote communication, and everyday conferencing. The 3300mAh battery works with the low-power system design to support practical daily use, while thermal optimization helps maintain quieter operation during extended tasks.
Persistent changes from PowerShell
PowerShell also provides [Environment]::SetEnvironmentVariable() for persistent User or Machine environment-variable changes. Microsoft documents it alongside the System Control Panel method in its environment variables documentation. Because a persistent append must preserve the existing stored PATH carefully and select the intended scope, the graphical editor is easier to review for most users.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Scan for outdated or missing drivers - takes under a minute3Clear out junk files and repair common Windows errorsA PowerShell profile is another option for shell-specific startup customizations, but it is not the same as changing the persistent User or System PATH. Microsoft describes profiles in its PowerShell profiles documentation.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




