Baking with XAMPP on Windows

I’m not sure if it’s just my set-up but when I run cake.bat and say, try to bake a model I get

  1.  
  2. Fatal error: Call to undefined function mysqli_connect() in C:\…\cake\libs\model\datasources\dbo\dbo_mysqli.php on line 73
  3.  

The reason is that php.exe when run from a command line uses a different php.ini than PHP that’s run as an Apache module. To fix this edit cake.bat and add -c"C:\xampp\apache\bin\php.ini". This is the path where XAMPP placed php.ini.