Partager via


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

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>

Comments

  • Anonymous
    June 23, 2005
    When doing the above 12 steps, then I press ok to continue the .net installation, while registering system.enterpriseservices.dll, instead of giving me the usual error, it gives me an error that msiexec was closed due to a problem, then the installation gives me another error while removing files. It says that the installation is complete then, but I cannot run my software that rquires the .net framework

    I also installed .net framework 2.0 beta, but my software seems that it does not recognise it

    thanks

  • Anonymous
    July 01, 2005
    Hi, sorry for the delay replying to this post. Can you please use the steps that I list at http://blogs.msdn.com/astebner/archive/2005/03/29/403575.aspx to gather a verbose log for this failed installation and then send it to me at aaronste (at) microsoft (dot) com and I can see if I can help further?

    Also, can you explain what you mean about your software not recognizing that the .NET Framework 2.0 beta is installed? Is it giving you an error message, or is there some other failure when you run this other software? Also, what software are you referring to in this case?

  • Anonymous
    July 24, 2005
    I was contacted by a customer last week who could not get the .NET Framework 1.1 to install correctly.&amp;nbsp;...

  • Anonymous
    July 26, 2005
    I was contacted by a customer last week who could not get the .NET Framework 1.1 to install correctly.&amp;nbsp;...

  • Anonymous
    August 19, 2005
    HELP !!!
    I have problems installing .NET 1.1 on Win NT 4.0. When i debugg using MsiBreak and WinDBG i get the message: ERROR: Symbol file could not be found. Defaulted to export symbols for D:WINNTMicrosoft.NETFrameworkv1.1.4322mscorwks.dll - mscorwks!

    Please help me...

  • Anonymous
    August 21, 2005
    Hi Marit - there should be an option to continue and skip the error that you describe. Can you try that and see if you can still gather a stack trace?

    Also, I suggest taking a look at the language settings on your machine (described at http://blogs.msdn.com/astebner/archive/2005/07/24/442747.aspx). That post specifies Windows XP SP2, but certain language settings will also cause problems on NT4 and Windows 2000.

    Hope this helps.

  • Anonymous
    August 21, 2005
    A couple of months ago, I posted a set of debugging instructions for the .NET Framework setup that describes...

  • Anonymous
    August 22, 2005
    The comment has been removed

  • Anonymous
    August 23, 2005
    Since I originally posted these instructions that describe how to gather callstack information when the...

  • Anonymous
    August 23, 2005
    Hi Marit - I can't tell for sure from the snippet of the callstack, but this sounds similar to the issue I just blogged about regarding OS images and the .NET Framework setup. Can you take a look at the item at http://blogs.msdn.com/astebner/archive/2005/08/23/455401.aspx and see if this sounds like the same scenario as you are experiencing?

  • Anonymous
    August 23, 2005
    Yes, this looks like the same scenario. I will try to reinstall NT, and see if that helps.
    Thanks....

  • Anonymous
    October 15, 2005
    I used the debugging tool and this time .Net Framework installed. But, the software that I use that relies on it is not running. Any ideas??

  • Anonymous
    October 17, 2005
    Hi Jean - can you describe the errors you see when trying to run your software that relies on the .NET Framework?

    Also, could you try to use the .NET Framework verification tool that I have posted at http://astebner.sts.winisp.net/Tools/netfx_setupverifier.zip and see if it reports any file version errors for the version of the .NET Framework that you have installed?

  • Anonymous
    February 12, 2006
    CommandLine: C:WINDOWSMicrosoft.NETFrameworkv2.0.50727RegSvcs.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: 7c900000 7c9b0000   ntdll.dll
    ModLoad: 79000000 79045000   C:WINDOWSsystem32mscoree.dll
    ModLoad: 7c800000 7c8f4000   C:WINDOWSsystem32KERNEL32.dll
    (10c0.10c4): Break instruction exception - code 80000003 (first chance)
    eax=00241eb4 ebx=7ffd7000 ecx=00000000 edx=00000001 esi=00241f48 edi=00241eb4
    eip=7c901230 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:
    7c901230 cc               int     3


    Help, please?

  • Anonymous
    February 15, 2006
    The comment has been removed

  • Anonymous
    April 03, 2006
    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:WINDOWSMicrosoft.NETFrameworkv2.0.50727regsvcs.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:WINDOWSsystem32mscoree.dll
    ModLoad: 7c800000 7c904000   C:WINDOWSsystem32KERNEL32.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:WINDOWSsystem32ADVAPI32.dll
    ModLoad: 77e50000 77ee1000   C:WINDOWSsystem32RPCRT4.dll
    ModLoad: 77f60000 77fd6000   C:WINDOWSsystem32SHLWAPI.dll
    ModLoad: 77ef0000 77f37000   C:WINDOWSsystem32GDI32.dll
    ModLoad: 77d10000 77da0000   C:WINDOWSsystem32USER32.dll
    ModLoad: 77be0000 77c38000   C:WINDOWSsystem32msvcrt.dll
    ModLoad: 00d50000 00d7c000   C:WINDOWSsystem32interceptor.dll
    ModLoad: 10000000 1004b000   C:WINDOWSsystem32InterceptHelper.dll
    ModLoad: 7c3a0000 7c41b000   C:WINDOWSsystem32MSVCP71.dll
    ModLoad: 7c340000 7c396000   C:WINDOWSsystem32MSVCR71.dll
    ModLoad: 77bd0000 77bd8000   C:WINDOWSsystem32VERSION.dll
    ModLoad: 5b090000 5b0c8000   C:WINDOWSsystem32uxtheme.dll
    ModLoad: 10000000 1004b000   C:WINDOWSsystem32InterceptHelper.dll
    ModLoad: 7c3a0000 7c41b000   C:WINDOWSsystem32MSVCP71.dll
    ModLoad: 7c340000 7c396000   C:WINDOWSsystem32MSVCR71.dll
    ModLoad: 77bd0000 77bd8000   C:WINDOWSsystem32VERSION.dll
    (ff8.724): C++ EH exception - code e06d7363 (first chance)
    (ff8.724): C++ EH exception - code e06d7363 (first chance)
    ModLoad: 79e70000 7a3d1000   C:WINDOWSMicrosoft.NETFrameworkv2.0.50727mscorwks.dll
    ModLoad: 78130000 781cb000  

    C:WINDOWSWinSxSx86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.49_x-ww_0de06ad4MSVCR80.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:WINDOWSsystem32KERNEL32.dll -
    KERNEL32!IsBadReadPtr+0x39:
    7c809eec 8a02             mov     al,[edx]                ds:0023:00000051=??

  • Anonymous
    April 05, 2006
    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:WINDOWSsystem32mscoree.dll
    ModLoad: 7c800000 7c8f4000   C:WINDOWSsystem32KERNEL32.dll
    ModLoad: 77dd0000 77e6b000   C:WINDOWSsystem32ADVAPI32.dll
    ModLoad: 77e70000 77f01000   C:WINDOWSsystem32RPCRT4.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

  • Anonymous
    April 11, 2006
    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.

  • Anonymous
    April 30, 2006
    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.

  • Anonymous
    May 16, 2006
    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

  • Anonymous
    May 17, 2006
    I got an email from the .NET Framework setup technical support team today with some more information...

  • Anonymous
    September 14, 2006
    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:WINDOWSMicrosoft.NETFrameworkv1.1.4322RegSvcs.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:WINDOWSsystem32mscoree.dll
    ModLoad: 7c800000 7c8f4000   C:WINDOWSsystem32KERNEL32.dll
    ModLoad: 77dd0000 77e6b000   C:WINDOWSsystem32ADVAPI32.dll
    ModLoad: 77e70000 77f01000   C:WINDOWSsystem32RPCRT4.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:WINDOWSsystem32SHLWAPI.dll
    ModLoad: 77f10000 77f56000   C:WINDOWSsystem32GDI32.dll
    ModLoad: 77d40000 77dd0000   C:WINDOWSsystem32USER32.dll
    ModLoad: 77c10000 77c68000   C:WINDOWSsystem32msvcrt.dll
    ModLoad: 791b0000 79412000   C:WINDOWSMicrosoft.NETFrameworkv1.1.4322mscorwks.dll
    ModLoad: 7c340000 7c396000   C:WINDOWSMicrosoft.NETFrameworkv1.1.4322MSVCR71.dll
    ModLoad: 79040000 79085000   C:WINDOWSMicrosoft.NETFrameworkv1.1.4322fusion.dll
    ModLoad: 7c9c0000 7d1d4000   C:WINDOWSsystem32SHELL32.dll
    ModLoad: 773d0000 774d2000   C:WINDOWSWinSxSx86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9comctl32.dll
    ModLoad: 5d090000 5d127000   C:WINDOWSsystem32comctl32.dll
    ModLoad: 79780000 79980000   c:windowsmicrosoft.netframeworkv1.1.4322mscorlib.dll
    ModLoad: 774e0000 7761c000   C:WINDOWSsystem32ole32.dll
    ModLoad: 79510000 79523000   C:WINDOWSMicrosoft.NETFrameworkv1.1.4322mscorsn.dll
    ModLoad: 0ffd0000 0fff8000   C:WINDOWSsystem32rsaenh.dll
    ModLoad: 79430000 7947c000   C:WINDOWSMicrosoft.NETFrameworkv1.1.4322MSCORJIT.DLL
    ModLoad: 7b0a0000 7b1cc000   c:windowsmicrosoft.netframeworkv1.1.4322system.dll
    ModLoad: 7b490000 7b506000   c:windowsmicrosoft.netframeworkv1.1.4322system.drawing.dll
    ModLoad: 7a000000 7a018000   c:windowsmicrosoft.netframeworkv1.1.4322system.directoryservices.dll
    ModLoad: 7a020000 7a05e000   c:windowsmicrosoft.netframeworkv1.1.4322system.messaging.dll
    ModLoad: 7a060000 7a082000   c:windowsmicrosoft.netframeworkv1.1.4322system.serviceprocess.dll
    ModLoad: 7a6e0000 7a81e000   c:windowsmicrosoft.netframeworkv1.1.4322system.data.dll
    ModLoad: 79620000 79635000   c:windowsmicrosoft.netframeworkv1.1.4322system.enterpriseservices.thunk.dll
    ModLoad: 77120000 771ac000   C:WINDOWSsystem32OLEAUT32.dll
    ModLoad: 76fd0000 7704f000   C:WINDOWSsystem32CLBCATQ.DLL
    ModLoad: 77050000 77115000   C:WINDOWSsystem32COMRes.dll
    ModLoad: 77c00000 77c08000   C:WINDOWSsystem32VERSION.dll
    ModLoad: 6e730000 6e763000   C:WINDOWSsystem32Comcomadmin.dll
    ModLoad: 61990000 61999000   C:WINDOWSsystem32MfcSubs.dll
    ModLoad: 75130000 75144000   C:WINDOWSsystem32colbact.DLL
    ModLoad: 77fe0000 77ff1000   C:WINDOWSsystem32Secur32.dll
    ModLoad: 20000000 202c5000   C:WINDOWSsystem32xpsp2res.dll
    (f5c.e24): CLR exception - code e0434f4d (first chance)
    ModLoad: 51a70000 51af0000   C:WINDOWSMicrosoft.NETFrameworkv1.1.4322diasymreader.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?

  • Anonymous
    September 15, 2006
    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?

  • Anonymous
    November 17, 2006
    I got an email from the .NET Framework setup technical support team today with some more information

  • Anonymous
    May 19, 2008
    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.

  • Anonymous
    January 20, 2009
    PingBack from http://www.hilpers.com/1046837-error-0x80070643-bei-wsus-installation