I just installed the software, so this may not be the answer you're looking for, but here goes my solution (as well as some tweaks).
I got the same error message so I ran xampp_stop.exe, which stops both Apache and MySQL. Then I ran the installservice.bat files for each to start them back up as services...
Apache as a service
ApacheFriends\xampp\apache\apache_installservice.bat
MySQL as a service
ApacheFriends\xampp\mysql\mysql_installservice.bat
I'm not sure if that's the same problem you were having, you may have been smart enough (unlike me) to stop the programs before trying to run them as services. Good luck!
::NOTE 1::
I don't like doing the files seperate, so I created a file in the root directory (xampp) to do it all at once. To do that, open notepad and type
@echo off
cd apache
call apache_installservice.bat
cd ..\mysql
call mysql_installservice.bat
Then save the file as a .bat file. (I saved it as xampp_start_services.bat)
To create a shutdown file, open notepad and type
@echo off
cd apache
call apache_uninstallservice.bat
cd ..\mysql
call mysql_uninstallservice.bat
Then save the file as a .bat file. (I saved it as xampp_stop_services.bat)
Now if you really want it automated, you can edit the original files so they don't give the "Press any button to continue..." message. Do this and they'll just close on their own if everything starts correctly. Open each of these four files in Notepad:
apache\apache_installservice.bat
apache\apache_uninstallservice.bat
mysql\mysql_installservice.bat
mysql\mysql_uninstallservice.bat
and change the very last line from
pause
to
if ERRORLEVEL 1 pause
::NOTE 2::
If you installed the program in a directory path with a space in the name such as "C:\Program Files\apachefriends" you will have to edit the mysql_installservice.bat (in NotePad) adding quotes around paths to account for the space in "Program Files"
So
copy %cd%\bin\my.cnf /-y %windir%\my.ini
bin\mysqld-nt --install mysql --defaults-file=%cd%\bin\my.cnf
becomes
copy "%cd%\bin\my.cnf" /-y %windir%\my.ini
bin\mysqld-nt --install mysql --defaults-file="%cd%\bin\my.cnf"
I HOPE AT LEAST SOME OF THIS JUNK HELPED YOU OUT! GOOD LUCK AND WISH ME LUCK!
- I had to beat them to death with their own shoes.