First run setup.py file (to add this folder to your environment variables)
Also complete the process mentioned in this link https://stackoverflow.com/a/53960829
then from anywhere run
pdf2img.bat <pdf_file_name>
or you can run
pdf2img.bat <pdf_file_name> --nodir
to not save images inside another folder and save them in the same directory