That's usually caused by a permissions error. Try rebooting your computer, then uninstall and reinstall the Leap Motion software to see if that error still appears when you try installing the software
If the issue persists, try right clicking on the installer and install as an administrator