From your command window, run
Take a look at the output, you should be able to find your PHP installation directory there.
Search online for something like "set windows environment variable", or grab a book on windows. You should be able to find out how to modify %PATH% (which is an environment variable) through control panel.
Say myprogram.exe is in c:\bar, you just need to make sure that at the end of your %PATH%, add