I've been trying to install XAMPP for quite some time now, but every time, at the end of the installation, it says:
Windows cannot find "-n"
And after that, it says:
Problem running post-install step. Installation failed (php.exe) Perhaps you have to install Visual C++ 2008 package.
I have Visual C++ 2008 package and it still says this. What do I do now? I have Windows 10 64-bit for anyone wondering.
The XAMPP installation is very straightforward, but Windows 10 sometimes may not allow the Apache server to run. Usually, it's because the World Wide Publishing Service is running on port 80 on your computer, which also happens to be the default TCP/IP port that Apaches uses on XAMPP.
That error could be shown if you already had an older version of XAMPP installed to the default folder (C:\xampp) and you try to install a new version in a specific custom folder. Just go to the Windows Control Panel, Add or Remove programs and uninstall the old installation of XAMPP.
Choose the root directory path to set up the htdocs folder for our applications. For example 'C:\xampp'. Click the Allow access button to allow the XAMPP modules from the Windows firewall. After the installation process, click the Finish button of the XAMPP Setup wizard.
I installed it in the root of my C: drive and it worked. Strange that previously I could just install it in my program files folder and that everything works...
Had the same problem when I tried to install xampp in a folder with spaces in its name (some folder example)
It was solved after I reinstalled xampp in a folder that has no space in its name, E.g. c:/xampp
Change your registry settings.
- Open Registry Editor by pressing Windows + R key combination, type in
regedit
and press Enter.- If prompted by UAC, click on Yes to continue.
- Go to
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
- In right-side pane, look for a
EnableLUA
and set the value to 0 and close Registry Editor.- Restart your computer.
Source: windows10update.com
Then type in XAMPP shell:
setup_xampp.bat
That error could be shown if you already had an older version of XAMPP installed to the default folder (C:\xampp) and you try to install a new version in a specific custom folder. Just go to the Windows Control Panel, Add or Remove programs and uninstall the old installation of XAMPP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With