Couldn't install SSMS: A pending restart is blocking setup from completing SSMS version : 17.7


Log file: Log_file

I have SQL Server 2016 and Visual Studio 2017 Community Edition. 
I tried reinstalling both tools but the error is still the same.
Some links mention registry values and I tried that as well, but the problem remains the same.

I have restarted the system multiple times, but the restart pending is still showing.
I found a couple of other methods on some sites, tried them as well, but still the error message is showing.

It stops at the point shown below--not sure about Visual Studio 2015 as I'm using VS2017. I have tried repairing VS and SQL Server 2017 as well.
Go to the Visual Studio Isolated Shell download page, fill out the form, and ask for permission to get VS Shell.  Download Visual Studio 2015 Shell (isolated), run it, repair, reboot, run it again, uninstall, reboot.

Now, SSMS 17.x should install without errors.

Alternatively, (and less safely): Search the registry for "visual studio 2015" and delete all the keys that are related to the shell or its prerequisites. Repair SQL Server 2016 and then install SSMS.