If the installation of CUDA is failing on Windows 10 its most likely failing because you have GeForce Experience installed.
To fix this do a custom install without GeForce Experience and drivers, I have 3 Windows 10 machines with various OS releases on them (general and developer releases) and it works on each one of them.
I just wanted to say thanks to both. Disabling Visual Studio Integration fixed the problem for me as well.
For those who see this after me, Visual Studio Integration is under the CUDA installation options tree menu. I also did not install:
GeForce Experience Software
GeForce Drivers
PhysX
I had newer or equivalent versions of these at the time of installation, so I did not include them in the installation. I felt that I should include this information just in case it does actually matter and help someone.
As far as I can tell, the installer installed everything I asked it to and it seems to work, despite the installer claiming everything failed to install.
Any one who is facing this problem, I was also facing the same problem. I had done everything above but still it did not help me. Then I did the following:
searched for storage settings (in next to windows icon)
clicked on apps and features option
scrolled down and uninstalled every options that had nvidia written. (Restart is required after uninstalling)
Again installed the cuda with recommended option instead of custom. (success) :)
I had a problem installing CUDA 11 with similar symptoms. (Also, nvidia-smi showed Cuda v10, and deviceQuery failed.) I needed to update Windows 10, update VisualStudio to 2019 then repeatedly uninstall all Nvidia programs. An older DLL NVCUDA64.dll (from an earlier CUDA v10 install) was particularly stubborn, but finally was able to remove it, reboot, then installing CUDA v11 worked ok.
I have excluded Drivers in CUDA Custom install, but how to exclude the GeForce Experience?
If you could guide me properly, it would be so kind of you.
Thank you.