I've just finished dealing with this painful 'unknown error'.
First of all you need to be sure there are no previous versions damaged or bad-removed/uninstalled. A good practice is to use Perfect Uninstaller, here you can pick every component related and uninstall it, including SQL components which in my case got damaged when uninstalling VS2008. This may take a while because each time you select a component to uninstall, it loads its own uninstaller and independently if worked or not, it goes directly to the registry and through all the drives looking up for left files to delete. It worths it because it does the work for you.
After that, another thing is to get rid of the previous services, using Control Panel - Administrative Tools - Services, look-up for every SQL and VS service and double-clic each for knowing its exact name displayed as ServiceName:XXXX, and stop if running. Then in Start-Run type: sc delete XXXX , for each of the services. It must refer something like [ESC] Success Uninstalling...
After that, I went to the registry editor (Start-Run: regedit) and looked up for every Local Machine SOFTWARE Key referring Microsoft SQL and VS and deleted them. This was the worst stage because most of the keys have "Access Denied" for which you may go each by each (didn't know any way better) right-clicking each then going to Permissions... (it gives an error but just ignore) then go to Advanced(it gives another error but just ignore), then to Owner and there select your Administrator user account and clic OK. Back in Permissions... clic Add and type Administrators and clic enter. Now check the boxes for allowing Full Control permissions to administrators and clic OK. After that you should be able to delete it, if not, the reason is that there are hidden subkeys (they will appear after deletion failed) that need you to be the owner as described. This process is very painful because you need to own every single key in order to delete them, so you need to go inside every key until everyone is owned. The worst part is under Microsoft/Visual Studio...
Next step is to go to Program Files and delete those folders with SQL and VS that were left but are no more used.
Finally, I found useful to use Windows Install Cleanup and removed every thing I got rid off.
Then I just re-installed VS2010 and everything went very nice ;)
Expect an hours-in-a-road process...or just format...in my case I didn't want to format and I think it was worth it because it took less time than personalizing and installing every single program again...
Hope this helps.
=D
PS. I've also tried some tools you may found in google that are for VS removal but no one worked for me.
Visual Studio is a complex piece of software, and can get itself stuck in a strange state if installation fails any time.
I would strongly recommend you do a new fresh Windows 7 install, and take careful steps to follow a path that should lead to a successful install. Starting fresh is often much better when something strange is happening with Visual Studio any edition.
- Fresh install Windows 7
- Complete patch of updates, including Service Pack 1.
- Install the .NET 4 framework prior to Visual Studio 2010 (had luck myself doing this)
- Check for new Windows Update patches
- Install Visual Studio 2010
Also Note: If you're installing a version of SQL Server that's not express edition, do that before Visual Studio 2010 (seems to work for me too).
Best Answer
Installing Visual Studio 2010 RTM and Service Pack 1 together