As ivan.sim writes in his answer
- Ensure that your user account has administrator privilege.
- Disable UAC(User Account Control) as it restricts certain administrative function needed to run a web server.
- Install in C://xampp.
Problem with the correct answer is in the explanation of point 2., and magicandre1981 writes more about it
Moving the slider down doesn't completely disable UAC since Windows 8. This is changed compared to Windows 7, because the new Store apps require an active UAC. With UAC off, they no longer run.
How can we then disable UAC and install XAMPP?
Easy. Go to Registry Editor and navigate to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
Right click EnableLUA and modify the Value data to 0.
Then restart your computer and you're ready to install XAMPP.