Freigeben über


Setup.exe has encountered a problem and needs to close

While trying to run the .Net Framework 3.5/2.0 setup on a Windows 2003 x86 system, it just crashes immedaitely with the following error message: “Setup.exe has encountered a problem and needs to close”

I launched the setup.exe in the debugger (https://msdn.microsoft.com/en-us/windows/hardware/gg463009) and took a crash dump (https://support.microsoft.com/kb/286350). You can also run the following command: cscript adplus.vbs -crash –sc setup.exe

After debugging I found that it crashes in SITSetup!COSVersion::GetExeLangID because a CFileVersion class has not been populated for C:\Windows\System32\user.exe. In COSVersion::GetExeLangID we attempt to create a new CFileVersion class, which calls SITSetup!CFileVersion::Init, which in turn calls version!GetFileVersionInfoSizeW. version!GetFileVersionInfoSizeW is returning null for C:\Windows\System32\user.exe which causes the CFileVersion class to not be populated which leads to the crash. Calling version!GetFileVersionInfoSizeW on user.exe is a common way for applications to obtain the file version and language information for the OS.

0:000> .frame 0
00 0013dd40 3aae7d5a SITSetup!COSVersion::GetExeLangID+0x22

0:000>dv
this = 0x3aae7aca
szExe = 0x01059830 "9999999999999999999???"
filever = class CFileVersion

0:000> dt filever
Local var @ 0x13dd10 Type CFileVersion
+0x000 m_szFile : std::basic_string<unsigned short,std::char_traits<unsigned short>,std::allocator<unsigned short> >
+0x01c m_pVersionInfo : (null)
+0x020 m_pTranslation : (null)
+0x024 m_uNumTranslation : 0

//from AV mini dump
0:000> !gle
LastErrorValue: (Win32) 0x714 (1812) - The specified image file did not contain a resource section.
LastStatusValue: (NTSTATUS) 0xc8 - The code segment cannot be greater than or equal to 64K.

In SITSetup!COSVersion::GetExeLangID() a CFileVersion of objects is constructed and we dereference the m_pTranslatoin member causing an AV. This seems to be because one of the Win32 APIs in CFileversio::Init is failing with ERROR_RESOURCE_DATA_NOT_FOUND (1812). Difficult to tell which - but base of the remaining stack in the mini dumps it may be GetFileVersionInfoSize(). So I checked the file C:\WINDOWS\system32\user.exe and found that it didn’t have a resource section at all. From this I could conclude that the user.exe file was corrupted. As it was a system protected file, I reinstalled Win 2003 SP2. I was able to install .Net Framework 3.5 successfully.

Comments

  • Anonymous
    August 09, 2010
    Help me !!! The same occured for me and i am running xp sp 3 must i re-install????

  • Anonymous
    August 11, 2010
    The comment has been removed