First, your user must have administrator permission.
Second, install Xampp outside of “program files“, preferably install in C:\xampp
(It usually comes with this by default).
Third, after installation (Before running Xampp), go to the C:\xampp
directory, look for xampp-control.exe
, right click on it, go to “properties” go to the “compatibility” tab and then check the “run as administrator” option.