First you need to install python. I recommend install activepython. Don’t forget to add environment variables PYTHONPATH and PYTHONHOME pointing to python installation directory. This might be needed by some scripts and modules (instalation in polish).
Then install pil for windows 64bit (unofficial builds). I don’t recommend installing with package manager like pip or pypm because it installs version of pil without jpeg support or even png or tiff.
Then install FileMenu Tools. Add new action only for folder and point to your script. It should work from now on.