Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 stackoverflow.com Feb 15 '10 at 20:59

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

3 Answers 3

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.
See: http://msdn.microsoft.com/en-us/library/ee872121(VS.85).aspx

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.