# Run PHP from a command line in windows before starting up a software

I wish to use the following PHP code:

And have it run in the beginning (and ending) of every time I start a particular software (specifically, when I start the todolist software)

Any suggestions on how that can be done?

I wish to know:

1. How to run PHP from a command line in windows. And,
2. How to have this done automatically when I start/finish using a software

Many thanks, Tal

p.s: this is a cross between a SO and superuser question. I hope this will be excused.

-
This is probably more of a SU question, since software that does this probably already exists. –  Hello71 Aug 16 '10 at 16:45

Then, you can make a simple .bat file, first you type in the php command to run whatever you want c:\path\to\php GCalSyncToDoList.php, then you put your application name/executable on the second line, then repeate your first line on the last. I don't have a windows machine at hand, but it should work.