Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I would like to run the command line : "php file.php" insted of "C:\xampp\php\php.exe file.php"

I tried to look on registry editor, without success

Could you help me ?

share|improve this question

migrated from Feb 15 '10 at 20:59

This question came from our site for professional and enthusiast programmers.

You can add C:\xampp\php\ to your PATH env variable. Test it out locally by doing this:

C:\>set PATH=%PATH%;C:\xampp\php
C:\>php file.php

In the end, if you want to keep this across multiple cmd sessions, you will need to go into your System dialog in your Control Panel and add it to the Path environment variable there.

share|improve this answer

You could doskey at a command prompt.

doskey /?

will give you brief help,

doskey php=C:\xampp\php\php.exe $*

will define a macro so that

php file.php

will expand to

C:\xampp\php\php.exe file.php
share|improve this answer

There is a registry key where you can register applications called App Paths.

share|improve this answer

You must log in to answer this question.