Are you just typing something like "c:\blah\script.php"?
Because if you are, then it would naturally pop up in a DOS prompt. The way to get it to work in a browser is to install a server program then call the script like this:
http://[iphere]/script.php
And make sure while setting up the server that you have a port other than 80, or other people will be able to access your files. Also make the root directory the directory of your scripts.
So if your root directory is "c:\blah" then the above url will work.
Changing these items varies per server program, but if you decide on Apache (which I suggest) you would edit the httpd.conf file under [apache install dir]\conf\httpd.conf
I know it's a bit of a long process but i dont believe its possible (without extra coding) to make php handled through the browser without a server