You can run php pages using php.exe create some php file with php code and in the cmd write:
[PATH to php.ext]\php.exe [path_to_file]\file.php
Example Case for you:
1. My XAMPP is installed on D:\php\ and php.exe resides in D:\php\php and Magento folder is here D:\php\htdocs\MG\m212 ( http://localhost/MG/m212/)
2. Re-indexing:
i. Go on to D:
ii. D:\php\php>php D:\php\htdocs\MG\m212\bin\magento indexer:reindex
On XAMPP
Installed Xampp_root/php>php 'Path_to_project'
It will work for you.
EDIT:
- Go to php installation:
cd c:\xampp\php\
- After that run: php.exe C:\xampp\htdocs\magento2\bin\magento indexer:reindex