CUDA 9.1 cannot install due to failed Visual Studio Integration

Here is some additional information I received from Nvidia, hope it helps… I tried it out and it worked for me

Unable to install CUDA 9.1- Installer failed

Response By Email (Ray) (05/10/2018 10:32 AM)
Hello,

My name is Ray and your support case was escalated to me for further review. We have received report of this issue and currently investigating. The workaround from another user impacted suggest this has something to do with the graphic drivers that is installed. Consider the steps below to install the standard VGA driver first and then install CUDA and see if that helps. Here are some steps below. I did include steps to enable installer logging below as well in case this fails, so we’ll have logs for development to analyze.

Step A: Install the standard VGA driver:

  1. Bring up the Windows Device Manager. You can do that my right-clicking on the Start button and then select Device Manager.
  2. Expand the “Display Adapter” list, right-click on the GeForce card and then select “Update Driver Software”.
  3. Click “Browse my computer for driver software”.
  4. Then click the “Let me pick from a list of device drivers on my computer”.
  5. Uncheck the “Show compatible hardware” option.
  6. Under the “Manufacture” scroll to the top and select the “(Standard display type)” and then click “Next”. If you are running multiple GPUs then repeat steps #2 - #6 for each GPU.
  7. Restart Windows. This will basically load the standard VGA driver.

Step B: Uninstall existing NV driver and clean registry:

  1. Download and install the Revo Uninstaller from here: http://www.revouninstaller.com/. There is a 30 days trial period.
  2. Launch the Revo Uninstaller tool.
  3. Uninstall all NVIDIA entries. There should be a few and they all should start with “NVIDIA…”.
  4. After each one you uninstall, Revo will give you option to scan for additional registry entry. Do the scan for each component and then select all the additional left-over registry entries and delete them all. This way all traces of all NVIDIA components will be removed.
  5. When all NVIDIA entries have been removed, restart windows again.
  6. Once back in Windows navigate to “C:\Program Files” and delete the entire “NVIDIA Corporation” folder if it exists.
  7. Once back in Windows navigate to “C:\Program Files (x86)” and delete the entire “NVIDIA Corporation” folder if it exists.
  8. Rename the “C:\Temp” folder to “C:\Temp_old” if folder exists.

Step C: Enable installer logging:

  1. To enable logging follow the steps in the knowledge based article here:
    How to enable NVIDIA Graphics Driver and GeForce Experience installer logging | NVIDIA. It’s just a matter of downloading the registry key file to enable/disable logging.

Step D: Install CUDA Toolkit 9.1:

  1. Navigate to the folder where you saved the CUDA Toolkit 9.1 package. This assumes you still have the binaries, otherwise just download again.
  2. Install the CUDA Toolkit 9.1 again.

Hopefully the above steps will allow CUDA Toolkit to install with the graphics drivers that is included in the package. Once CUDA has been successfully installed you can then update the graphics drivers back to the latest 397.64 version. But if problem still persists after above steps then please upload all the logs from the “C:\nvidialogging” folder. We will also need SetupAPI log files. This file is located in “C:\Windows\INF” folder . Please attached any logs matching “Setupapi.*.log”. I’ll have to forward these to development team to analyze and see if they can determine what is causing the failure.