Error installing XAMPP: Windows cannot find -n

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.

  1. Open Registry Editor by pressing Windows + R key combination, type in regedit and press Enter.
  2. If prompted by UAC, click on Yes to continue.
  3. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
  4. In right-side pane, look for a EnableLUA and set the value to 0 and close Registry Editor.
  5. Restart your computer.

Source: windows10update.com

Then type in XAMPP shell:

setup_xampp.bat

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...