Wednesday, November 25, 2009

Dealing with the "Cannot open include file: 'windows.h': No such file or directory" error and the "A problem has been encountered while loading the setup components. Canceling setup." error

I got the error - "Cannot open include file: 'windows.h': No such file or directory" after I had installed Visual Studio 2008 Team Suite and I tried to compile something that compiles on another persons computer. 
When I looked at "C:\Program Files\Microsoft SDKs\Windows" there was a directory v5.0.  I thought maybe that is because I have VS 2005 and not VS 2008.  So I googled the error and I read that someone named Chris Hubbard from Microsoft suggested maybe I should run Setup again.  I read this here http://channel9.msdn.com/forums/Coffeehouse/415758-Visual-Studio-2008-Professional-no-windowsh-/ .  So I put in the install cd in again and tried the setup.exe at which point I got the following error:"A problem has been encountered while loading the setup components.  Canceling setup."  I then restarted the computer and got the same error again. 

Below is the data from the log file
===========
In the file dd_install_Vs_vstscore_90.txt in my Documents and Settings\Usernme\Local Settings\Temp directory

[11/25/09,11:22:04] Setup.exe: MoveLoadProgress()
[11/25/09,11:22:04] Setup.exe: MoveLoadProgress()
[11/25/09,11:22:04] Setup.exe: AddGlobalCustomProperty
[11/25/09,11:22:04] setup.exe: ***ERRORLOG EVENT*** : ISetupModule::SetManager() failed in ISetupManager::LoadSetupObjectGuid() : vs_setup.dll
[11/25/09,11:22:05] Setup.exe: AddGlobalCustomProperty
[11/25/09,11:22:05] setup.exe: ***ERRORLOG EVENT*** : CSetupManager::LoadSetupObjectname() - Failed in call to LoadSetupObjectGuid() for strName:  in file: vs_setup.dll
[11/25/09,11:22:05] Setup.exe: AddGlobalCustomProperty
[11/25/09,11:22:05] setup.exe: ***ERRORLOG EVENT*** : LoadComponent(), LoadSetupObjectName failure: vs_setup.dll
[11/25/09,11:22:05] Setup.exe: AddGlobalCustomProperty
[11/25/09,11:22:05] setup.exe: ***ERRORLOG EVENT*** : LoadComponent failed in ISetupManager::LoadComponentsFromDBObject(): vs_setup.dll
[11/25/09,11:22:05] Setup.exe: AddGlobalCustomProperty
[11/25/09,11:22:05] setup.exe: ***ERRORLOG EVENT*** : CSetupManager::LoadDatabaseValues() - Failed in call to LoadComponentsFroMDBObjects()
[11/25/09,11:22:05] Setup.exe: AddGlobalCustomProperty
[11/25/09,11:22:05] setup.exe: ***ERRORLOG EVENT*** : CSetupManager::RunIntro() - Failed to Load Database Values
[11/25/09,11:22:05] vs70uimgr: Entering DisplayMessage() method.
[11/25/09,11:22:05] vs70uimgr: DisplayMessage_START:A problem has been encountered while loading the setup components. Canceling setup.
[11/25/09,11:22:05] Setup.exe: CCoreEngine-Proc() - Finished Main Message Loop
[11/25/09,11:26:45] vs70uimgr: DisplayMessage_END:A problem has been encountered while loading the setup components. Canceling setup.
[11/25/09,11:26:45] Setup.exe: AddGlobalCustomProperty
[11/25/09,11:26:45] setup.exe: ***ERRORLOG EVENT*** : CSetupManager::RunLoadSetup() - Failed to Run the Intro
[11/25/09,11:26:45] Setup.exe: UnloadSuiteComponents()
[11/25/09,11:26:45] UTILS::RunNGENAction: Started
[11/25/09,11:26:45] UTILS::RunNGENAction: starting "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ngen.exe queue continue"
[11/25/09,11:26:45] UTILS::RunNGENAction: ngen.exe returned 0
[11/25/09,11:26:45] Setup.exe: GetGlobalCustomProperty - Property: {383F0141-C682-4665-A69B-756E719C968D} - PropertyName: Process Return Code - Value:
[11/25/09,11:26:45] Setup.exe: SETUP EXIT CODE - 0
==============

I then found this link, which says to repair from Add/Remove programs and not from the disk
http://blogs.msdn.com/heaths/archive/2008/08/20/do-not-repair-vs-2008-sp1-from-installation-media.aspx

I then went to add/remove programs and tried to run Change/Remove on my "Microsoft Visual Studioe Team System 2008 Team Suite - ENU"  but this resulted in the same error.  So at this point I was stuck.  So  I went back to google and found this link - http://stackoverflow.com/questions/114332/visual-studio-setup-problem-a-problem-has-been-encountered-while-loading-the-s (yes the link ends with an 's').  The user had the same problem and was just trying to uninstall the program.  He found a neat tool to completely remove the application, which I didn't need to use but I might need down the road.  I didn't want to completely remove the application I just wanted to "add the sdk's to the application."  Further down the page, people suggest the problem is with some of the Hotfixes that came with VS 2008.

- Removed Hotfix, but had the same error (however this time it did go further in the install process)
- Removed Update for Microsoft Visual Studio Team system 2008 Team Suite - ENU (KB972221)
    - This time I ran Change/Remove from Add/Remove programs and "it worked" in that it went to the Update page. When I had originally installed the software I had selected everything, so there was nothing new to select.  So the "Update" button was grayed out.  What I did was to uncheck something (anything) and then check it back on. 
    - If you read Chris Hubbard's notes (from the above link), it says that "Normal repair" will only repair the installed components.  So technically I did not run Setup again, I just did the "Normal Repair". 
- After setup ran for a while when it tried to install "Microsoft SQL publishing wizard", I got the following error - "Microsoft Visual Studio Team System 2008 Team Suite - ENU has encountered a problem during setup.  Setup did not complete correctly."
It appears that a number of components did install.  I clicked "Finish"
This is what was in my setup log file:

***EndOfSession***[11/25/09,10:48:18] setup.exe: [2] ISetupModule::SetManager() failed in ISetupManager::LoadSetupObjectGuid() : vs_setup.dll
[11/25/09,10:48:18] setup.exe: [2] CSetupManager::LoadSetupObjectname() - Failed in call to LoadSetupObjectGuid() for strName:  in file: vs_setup.dll
[11/25/09,10:48:18] setup.exe: [0] LoadComponent(), LoadSetupObjectName failure: vs_setup.dll
[11/25/09,10:48:18] setup.exe: [0] LoadComponent failed in ISetupManager::LoadComponentsFromDBObject(): vs_setup.dll
[11/25/09,10:48:18] setup.exe: [2] CSetupManager::LoadDatabaseValues() - Failed in call to LoadComponentsFroMDBObjects()
[11/25/09,10:48:18] setup.exe: [2] CSetupManager::RunIntro() - Failed to Load Database Values
[11/25/09,10:49:41] setup.exe: [2] CSetupManager::RunLoadSetup() - Failed to Run the Intro
[11/25/09,10:51:08] setup.exe: [2] ISetupModule::SetManager() failed in ISetupManager::LoadSetupObjectGuid() : vs_setup.dll
[11/25/09,10:51:08] setup.exe: [2] CSetupManager::LoadSetupObjectname() - Failed in call to LoadSetupObjectGuid() for strName:  in file: vs_setup.dll
[11/25/09,10:51:08] setup.exe: [0] LoadComponent(), LoadSetupObjectName failure: vs_setup.dll
[11/25/09,10:51:09] setup.exe: [0] LoadComponent failed in ISetupManager::LoadComponentsFromDBObject(): vs_setup.dll
[11/25/09,10:51:09] setup.exe: [2] CSetupManager::LoadDatabaseValues() - Failed in call to LoadComponentsFroMDBObjects()
[11/25/09,10:51:09] setup.exe: [2] CSetupManager::RunIntro() - Failed to Load Database Values
[11/25/09,10:51:18] setup.exe: [2] CSetupManager::RunLoadSetup() - Failed to Run the Intro
[11/25/09,11:06:15] setup.exe: [2] ISetupModule::SetManager() failed in ISetupManager::LoadSetupObjectGuid() : vs_setup.dll
[11/25/09,11:06:15] setup.exe: [2] CSetupManager::LoadSetupObjectname() - Failed in call to LoadSetupObjectGuid() for strName:  in file: vs_setup.dll
[11/25/09,11:06:15] setup.exe: [0] LoadComponent(), LoadSetupObjectName failure: vs_setup.dll
[11/25/09,11:06:15] setup.exe: [0] LoadComponent failed in ISetupManager::LoadComponentsFromDBObject(): vs_setup.dll
[11/25/09,11:06:15] setup.exe: [2] CSetupManager::LoadDatabaseValues() - Failed in call to LoadComponentsFroMDBObjects()
[11/25/09,11:06:15] setup.exe: [2] CSetupManager::RunIntro() - Failed to Load Database Values
[11/25/09,11:07:13] setup.exe: [2] CSetupManager::RunLoadSetup() - Failed to Run the Intro
[11/25/09,11:22:04] setup.exe: [2] ISetupModule::SetManager() failed in ISetupManager::LoadSetupObjectGuid() : vs_setup.dll
[11/25/09,11:22:05] setup.exe: [2] CSetupManager::LoadSetupObjectname() - Failed in call to LoadSetupObjectGuid() for strName:  in file: vs_setup.dll
[11/25/09,11:22:05] setup.exe: [0] LoadComponent(), LoadSetupObjectName failure: vs_setup.dll
[11/25/09,11:22:05] setup.exe: [0] LoadComponent failed in ISetupManager::LoadComponentsFromDBObject(): vs_setup.dll
[11/25/09,11:22:05] setup.exe: [2] CSetupManager::LoadDatabaseValues() - Failed in call to LoadComponentsFroMDBObjects()
[11/25/09,11:22:05] setup.exe: [2] CSetupManager::RunIntro() - Failed to Load Database Values
[11/25/09,11:26:45] setup.exe: [2] CSetupManager::RunLoadSetup() - Failed to Run the Intro
[11/25/09,11:37:49] setup.exe: [2] ISetupModule::SetManager() failed in ISetupManager::LoadSetupObjectGuid() : vs_setup.dll
[11/25/09,11:37:49] setup.exe: [2] CSetupManager::LoadSetupObjectname() - Failed in call to LoadSetupObjectGuid() for strName:  in file: vs_setup.dll
[11/25/09,11:37:49] setup.exe: [0] LoadComponent(), LoadSetupObjectName failure: vs_setup.dll
[11/25/09,11:37:49] setup.exe: [0] LoadComponent failed in ISetupManager::LoadComponentsFromDBObject(): vs_setup.dll
[11/25/09,11:37:49] setup.exe: [2] CSetupManager::LoadDatabaseValues() - Failed in call to LoadComponentsFroMDBObjects()
[11/25/09,11:37:49] setup.exe: [2] CSetupManager::RunIntro() - Failed to Load Database Values
[11/25/09,11:37:53] setup.exe: [2] CSetupManager::RunLoadSetup() - Failed to Run the Intro
[11/25/09,11:53:22] Microsoft SQL Publishing Wizard: [2] Error: Installation failed for component Microsoft SQL Publishing Wizard. MSI returned error code 1603
***EndOfSession***

- The interesting is that after this setup when I got to "C:\Program Files\Microsoft SDKs\Windows" there is now a directory called "v6.0a".  So something did happen, and I am now able to compile that project.  There are a couple of oustanding items that I need to now deal with:
1.  Add the hotfixes back in
2.  What about that item that didn't properly install?


No comments: