Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

Using MsiBreak to gather debugging information for .NET Framework setup failures

Using MsiBreak to gather debugging information for .NET Framework setup failures

Rate This
  • Comments 26

I have been working on the .NET Framework setup since before v1.0 shipped, and in that time I've seen all sorts of bugs and setup failures.  There is one particularly tricky set of bugs that all show the same symptom but that we haven't been able to track down a common root cause for.  The error that is seen during setup is a failure to register System.EnterpriseServices.dll or a problem running RegSvcs.exe /bootstrapi, which then causes setup to stop and rollback.

Almost none of the cases I have seen where this error appears were actually caused by the file System.EnterpriseServices.dll itself.  It is a bit misleading because the registration of this file is done by a custom action during setup, and that custom action is the first time that the version of the CLR we are trying to install is used to run managed code on the computer.  So that means that if anything is wrong on the machine to cause that version of the CLR to not work properly, the error the user sees is that this DLL failed to register.

When we encounter an error like this, we typically try the following cleanup and troubleshooting steps in the order listed below.

  1. Download the .NET Framework 1.0 and 1.1 cleanup tool and run it
  2. Verify that the data in the Locale registry value located at HKEY_USERS\.Default\Control Panel\International is valid.  The Locale value should contain one of the values listed at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Nls\LocaleMapIDs
  3. Get a crash dump with Windbg on the custom action that registers System.EnterpriseServices.dll

In many cases, running the cleanup tool is sufficient, but every once in a while we run into a computer in a state that we can't diagnose and we have to try some more advanced debugging techniques like those listed in steps 2 and 3.

We use the following steps to configure the MsiBreak environment variable to cause .NET Framework setup to pause at the beginning of the custom action that registers System.EnterpriseServices.dll, attach a debugger and gather crash dump information:

  1. Download and install the Debugging Tools for Windows
  2. Right-click My Computer, and then click Properties.
  3. On the Advanced tab, click Environment Variables, and then under System Variables, click New.
    Note: You must add MsiBreak to the list of System Variables (and not to the list of User Variables).
  4. In the Variable Name field, enter "MsiBreak" (without the quotation marks).
  5. In the Variable Value field, enter the name of custom action you want to break on.  The name must match the name listed in the Action column of the CustomAction table of the MSI:
    For .NET Framework 1.0 or 1.1 setup: CA_ComregEnterpriseServices.3643236F_FC70_11D3_A536_0090278A1BB8
    For .NET Framework 2.0 setup: DD_CA_ComregEnterpriseServices_X86.3643236F_FC70_11D3_A536_0090278A1BB8
  6. Run .NET Framework setup and start installing
  7. During installation, a break message will appear stating "To debug your custom action, attach your debugger to process XXX (0xZZZ) and press OK".  Open WinDBG instead of following the instructions on the dialog that pops up.  If you are running on Windows Vista, you will need to launch WinDBG with elevated privileges.  To do that, right-click on WinDBG.exe and choose Run as administrator.
  8. From the File menu, choose Open Executable...
  9. In the File name text box, enter the following information:
    For .NET Framework 1.0 setup: %windir%\Microsoft.NET\Framework\v1.0.3705\regasm.exe
    For .NET Framework 1.1 setup: %windir%\Microsoft.NET\Framework\v1.1.4322\regsvcs.exe
    For .NET Framework 2.0 setup: %windir%\Microsoft.NET\Framework\v2.0.50215\regsvcs.exe (or change the build number depending on what build of .NET Framework 2.0 is being installed)
  10. In the Arguments text box, enter the following information:
    For .NET Framework 1.0 setup: %windir%\Microsoft.NET\Framework\v1.0.3705\System.EnterpriseServices.dll
    For .NET Framework 1.1 or 2.0 setup: /bootstrapi
  11. After entering the above information, choose Yes to save base workspace information
  12. Press g in the Windbg window to resume execution until the process crashes, then save the crash log to a file

Variations of the above steps can also be used to gather debugging information for any custom action that fails during an MSI-based setup as long as you are able to consistently reproduce the crash during setup.  You just need to substitute the appropriate custom action name in step 5 (by looking at the verbose MSI log file or looking at the MSI in Orca to get the exact name).  You also need to substitute the custom action name and command line parameters in steps 9 and 10 above.  In the case of this example, the custom actions are executable files that are installed as a part of .NET Framework setup.  If the custom action is a file streamed into the binary table of the MSI, I believe you will need to extract the file from the MSI and run it using rundll32.exe or something like that (but I haven't yet tried to do that to verify that it works like I think it will).

<update date="9/25/2006"> Added a note about running WinDBG with elevated privileges on Windows Vista </update>

 

  • Here is my log and I can't find why I can't install Framework 2.0?


    Microsoft (R) Windows Debugger  Version 6.6.0003.5
    Copyright (c) Microsoft Corporation. All rights reserved.

    CommandLine: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\regsvcs.exe /bootstrapi
    Symbol search path is: *** Invalid ***
    ****************************************************************************
    * Symbol loading may be unreliable without a symbol search path.           *
    * Use .symfix to have the debugger choose a symbol path.                   *
    * After setting your symbol path, use .reload to refresh symbol locations. *
    ****************************************************************************
    Executable search path is:
    ModLoad: 00400000 0040c000   RegSvcs.exe
    ModLoad: 7c910000 7c9c7000   ntdll.dll
    ModLoad: 79000000 79045000   C:\WINDOWS\system32\mscoree.dll
    ModLoad: 7c800000 7c904000   C:\WINDOWS\system32\KERNEL32.dll
    (ff8.724): Break instruction exception - code 80000003 (first chance)
    eax=00241eb4 ebx=7ffdf000 ecx=00000001 edx=00000002 esi=00241f48 edi=00241eb4
    eip=7c911230 esp=0012fb20 ebp=0012fc94 iopl=0         nv up ei pl nz na pe nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
    ntdll!DbgBreakPoint:
    7c911230 cc               int     3
    0:000> g
    ModLoad: 77da0000 77e4c000   C:\WINDOWS\system32\ADVAPI32.dll
    ModLoad: 77e50000 77ee1000   C:\WINDOWS\system32\RPCRT4.dll
    ModLoad: 77f60000 77fd6000   C:\WINDOWS\system32\SHLWAPI.dll
    ModLoad: 77ef0000 77f37000   C:\WINDOWS\system32\GDI32.dll
    ModLoad: 77d10000 77da0000   C:\WINDOWS\system32\USER32.dll
    ModLoad: 77be0000 77c38000   C:\WINDOWS\system32\msvcrt.dll
    ModLoad: 00d50000 00d7c000   C:\WINDOWS\system32\interceptor.dll
    ModLoad: 10000000 1004b000   C:\WINDOWS\system32\InterceptHelper.dll
    ModLoad: 7c3a0000 7c41b000   C:\WINDOWS\system32\MSVCP71.dll
    ModLoad: 7c340000 7c396000   C:\WINDOWS\system32\MSVCR71.dll
    ModLoad: 77bd0000 77bd8000   C:\WINDOWS\system32\VERSION.dll
    ModLoad: 5b090000 5b0c8000   C:\WINDOWS\system32\uxtheme.dll
    ModLoad: 10000000 1004b000   C:\WINDOWS\system32\InterceptHelper.dll
    ModLoad: 7c3a0000 7c41b000   C:\WINDOWS\system32\MSVCP71.dll
    ModLoad: 7c340000 7c396000   C:\WINDOWS\system32\MSVCR71.dll
    ModLoad: 77bd0000 77bd8000   C:\WINDOWS\system32\VERSION.dll
    (ff8.724): C++ EH exception - code e06d7363 (first chance)
    (ff8.724): C++ EH exception - code e06d7363 (first chance)
    ModLoad: 79e70000 7a3d1000   C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
    ModLoad: 78130000 781cb000  

    C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.49_x-ww_0de06ad4\MSVCR80.dll
    (ff8.724): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=00000001 ebx=7c809eb3 ecx=00000051 edx=00000051 esi=00001000 edi=00000051
    eip=7c809eec esp=0012eb74 ebp=0012eba0 iopl=0         nv up ei pl zr na po nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246
    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for C:\WINDOWS\system32\KERNEL32.dll -
    KERNEL32!IsBadReadPtr+0x39:
    7c809eec 8a02             mov     al,[edx]                ds:0023:00000051=??
  • Hi, after reading almost all your posts on 1.1 errors, I think I've tryed just about everything except for asking for help. I may have a post or two, but I think I've read them. Could you please take a look at my debug log if you can? I installed 1.1 on the exact same software setup, XP Pro sp2, and it took like a fish to water. The only thing different here is the hardware, atleast to my knowledge. I've posted my log below. Thanks in advanced.

    ****************************************************************************
    * Symbol loading may be unreliable without a symbol search path.           *
    * Use .symfix to have the debugger choose a symbol path.                   *
    * After setting your symbol path, use .reload to refresh symbol locations. *
    ****************************************************************************
    Executable search path is:
    ModLoad: 79000000 7900a000   RegSvcs.exe
    ModLoad: 7c900000 7c9b0000   ntdll.dll
    ModLoad: 79170000 79196000   C:\WINDOWS\system32\mscoree.dll
    ModLoad: 7c800000 7c8f4000   C:\WINDOWS\system32\KERNEL32.dll
    ModLoad: 77dd0000 77e6b000   C:\WINDOWS\system32\ADVAPI32.dll
    ModLoad: 77e70000 77f01000   C:\WINDOWS\system32\RPCRT4.dll
    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
    (4e0.3a8): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=00000000 ebx=00000000 ecx=000007f4 edx=7c883710 esi=7c883700 edi=00000000
    eip=7c918fea esp=0013f868 ebp=0013f8dc iopl=0         nv up ei pl zr na po nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00010246
    ntdll!RtlpWaitForCriticalSection+0x5b:
    7c918fea ff4010           inc  dword ptr [eax+0x10] ds:0023:00000010=????????
    0:000> g
    (4e0.3a8): Access violation - code c0000005 (first chance)
    First chance exceptions are reported before any exception handling.
    This exception may be expected and handled.
    eax=0013fc54 ebx=00000000 ecx=0013fca8 edx=7c90eb94 esi=c0000005 edi=00000000
    eip=7c964ed1 esp=0013fc54 ebp=0013fca4 iopl=0         nv up ei pl zr na po nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
    ntdll!RtlRaiseStatus+0x26:
    7c964ed1 c9               leave

    - allanbutton@hotmail.com
  • Hi Alaska and Allan - Unfortunately, I cannot tell a root cause from the exception information that you provided in your comments above.  You are entitled to a free technical support call for .NET Framework setup related issues, so I would suggest contacting Microsoft technical support for more in-depth, one-on-one debugging assistance for these particular issues.  I'm sorry I'm not able to be more helpful here.
  • Hi All,
    I was unable to reinstall the .net framework since last 2 weeks. I tried all the suggestions given in many sites. It simply didnot work. Then i realised the problem might be in the OS - xp pro sp2. I ran antivirus software and found that a dll - pptp32.dll and some hax viruses have affected my OS. I removed the infections and then i was able to reinstall the framework. It also solved other problems like - media not opening in IE, unable to uninstall softwares, messenger not working etc. I thought this might be helpfull to others who are spending sleepless nights like me in trying to fix the framework. Hence posting it here.
  • Had a horrible time with this eact issue and went through all steps but finally solved by deinstalling Tenebril Spy Catcher and then installing .Net Framework 2.0
  • I got an email from the .NET Framework setup technical support team today with some more information...
  • Windows MCE 2005, trying to install .Net 1.1.  I uninstalled, used cleanup tool, here's the output from windbg:

    Microsoft (R) Windows Debugger  Version 6.6.0007.5
    Copyright (c) Microsoft Corporation. All rights reserved.

    CommandLine: C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\RegSvcs.exe /bootstrapi
    Symbol search path is: *** Invalid ***
    ****************************************************************************
    * Symbol loading may be unreliable without a symbol search path.           *
    * Use .symfix to have the debugger choose a symbol path.                   *
    * After setting your symbol path, use .reload to refresh symbol locations. *
    ****************************************************************************
    Executable search path is:
    ModLoad: 79000000 7900a000   RegSvcs.exe
    ModLoad: 7c900000 7c9b0000   ntdll.dll
    ModLoad: 79170000 79196000   C:\WINDOWS\system32\mscoree.dll
    ModLoad: 7c800000 7c8f4000   C:\WINDOWS\system32\KERNEL32.dll
    ModLoad: 77dd0000 77e6b000   C:\WINDOWS\system32\ADVAPI32.dll
    ModLoad: 77e70000 77f01000   C:\WINDOWS\system32\RPCRT4.dll
    (f5c.e24): Break instruction exception - code 80000003 (first chance)
    eax=00241eb4 ebx=7ffdd000 ecx=00000007 edx=00000080 esi=00241f48 edi=00241eb4
    eip=7c901230 esp=0012fb20 ebp=0012fc94 iopl=0         nv up ei pl nz na po nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202
    *** ERROR: Symbol file could not be found.  Defaulted to export symbols for ntdll.dll -
    ntdll!DbgBreakPoint:
    7c901230 cc              int     3
    0:000> g
    ModLoad: 77f60000 77fd6000   C:\WINDOWS\system32\SHLWAPI.dll
    ModLoad: 77f10000 77f56000   C:\WINDOWS\system32\GDI32.dll
    ModLoad: 77d40000 77dd0000   C:\WINDOWS\system32\USER32.dll
    ModLoad: 77c10000 77c68000   C:\WINDOWS\system32\msvcrt.dll
    ModLoad: 791b0000 79412000   C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorwks.dll
    ModLoad: 7c340000 7c396000   C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\MSVCR71.dll
    ModLoad: 79040000 79085000   C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\fusion.dll
    ModLoad: 7c9c0000 7d1d4000   C:\WINDOWS\system32\SHELL32.dll
    ModLoad: 773d0000 774d2000   C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
    ModLoad: 5d090000 5d127000   C:\WINDOWS\system32\comctl32.dll
    ModLoad: 79780000 79980000   c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll
    ModLoad: 774e0000 7761c000   C:\WINDOWS\system32\ole32.dll
    ModLoad: 79510000 79523000   C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorsn.dll
    ModLoad: 0ffd0000 0fff8000   C:\WINDOWS\system32\rsaenh.dll
    ModLoad: 79430000 7947c000   C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\MSCORJIT.DLL
    ModLoad: 7b0a0000 7b1cc000   c:\windows\microsoft.net\framework\v1.1.4322\system.dll
    ModLoad: 7b490000 7b506000   c:\windows\microsoft.net\framework\v1.1.4322\system.drawing.dll
    ModLoad: 7a000000 7a018000   c:\windows\microsoft.net\framework\v1.1.4322\system.directoryservices.dll
    ModLoad: 7a020000 7a05e000   c:\windows\microsoft.net\framework\v1.1.4322\system.messaging.dll
    ModLoad: 7a060000 7a082000   c:\windows\microsoft.net\framework\v1.1.4322\system.serviceprocess.dll
    ModLoad: 7a6e0000 7a81e000   c:\windows\microsoft.net\framework\v1.1.4322\system.data.dll
    ModLoad: 79620000 79635000   c:\windows\microsoft.net\framework\v1.1.4322\system.enterpriseservices.thunk.dll
    ModLoad: 77120000 771ac000   C:\WINDOWS\system32\OLEAUT32.dll
    ModLoad: 76fd0000 7704f000   C:\WINDOWS\system32\CLBCATQ.DLL
    ModLoad: 77050000 77115000   C:\WINDOWS\system32\COMRes.dll
    ModLoad: 77c00000 77c08000   C:\WINDOWS\system32\VERSION.dll
    ModLoad: 6e730000 6e763000   C:\WINDOWS\system32\Com\comadmin.dll
    ModLoad: 61990000 61999000   C:\WINDOWS\system32\MfcSubs.dll
    ModLoad: 75130000 75144000   C:\WINDOWS\system32\colbact.DLL
    ModLoad: 77fe0000 77ff1000   C:\WINDOWS\system32\Secur32.dll
    ModLoad: 20000000 202c5000   C:\WINDOWS\system32\xpsp2res.dll
    (f5c.e24): CLR exception - code e0434f4d (first chance)
    ModLoad: 51a70000 51af0000   C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\diasymreader.dll
    eax=00000000 ebx=00000000 ecx=77d40000 edx=77c61ae8 esi=7c90e88e edi=00000000
    eip=7c90eb94 esp=0012fe84 ebp=0012ff80 iopl=0         nv up ei pl zr na pe nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
    ntdll!KiFastSystemCallRet:
    7c90eb94 c3              ret

    Can you help?
  • Hi Dleedy - Can you please try the workarounds listed at http://blogs.msdn.com/astebner/archive/2006/05/17/600677.aspx and see if any of them help you resolve this issue?
  • I got an email from the .NET Framework setup technical support team today with some more information

  • My scenario was that I had used nLite to

     1- put my 2 Windows XP MCE 2005 installation CDs into one

     2- integrate my sata drivers into the cd (no more F6)

     3- have an unattended setup

    Everything went well until one of the updates wanted .net-1.1.

    The dotnet 1.1 install would fail everytime with the error "Setup ended prematurely".

    Dotnet 2,3, and 3.5 worked and isntalled fine.

    I followed the instructions here and once i hit the break point, i used windbg and saw the 'crash' but to be honest I didn't quite understand it. So I decided to just run the command in cmd.exe ... maybe I could see what's happenng ... it worked fine. I clicked OK on the breakpoint dialog and got a message that the setup succeeded!!! I don't know HOW it helped, but I could even install the dotnet-1.1 SP1 with no trouble afterwards.

    this wasn't the end of my problems (I ended up formatting the machine), but it ended my Dotnet 1.1 premature isntallation issue.

    maybe the later issues were unrelated, but if you are having such symptoms, you have have a corrupt installation.

  • PingBack from http://www.hilpers.com/1046837-error-0x80070643-bei-wsus-installation

Page 2 of 2 (26 items) 12
Leave a Comment
  • Please add 1 and 5 and type the answer here:
  • Post