Home » Questions » Computers [ Ask a new question ]

How do I install commands on command line? - Windows 7

How do I install commands on command line? - Windows 7

Hi I often use Power Shell on Windows 7

Asked by: Guest | Views: 243
Total answers/comments: 2
bert [Entry]

"You'll need to set the PATH. There are several paths, and in the end they (usually) get merged in to one.

PATH entries are delimited by semicolon (;).

Two are managed by Windows:

The system path. Affects all users on the computer.
The user path. Affects all programs you run under your user account.

Under Windows 7, the first two are easy to find: open the start menu and type PATH.

Under older Windows version, you'll need to find the Environment Variables settings. There are several ways to get to them, and it varies by Windows version, but the other answers are valid.

A third is process-specific:

The current process path. Affects the current process and any new processes it creates.

If you're in a PowerShell session, the PATH is visible as $env:PATH. To add something, use +=. I'd recommend using env. vars. instead of hard paths where possible.

PS > $env:PATH += "";C:\Python26\""
PS > $env:PATH += "";$($env:ProgramFiles)\Bar\""

Normally you'd do this in your profile. The path can be found at $profile:

PS > notepad $PROFILE"
bert [Entry]

"Add folders C:\Python26\ and C:\Python26\scripts to path.
Go to system administration -> Environment -> Locate path and add your folders. Do not delete anything."