Partager via


Error installing .NET Framework on Windows XP SP2 caused by Data Execution Prevention (DEP)

Note - the issue described in this blog post was originally presented as an issue on Windows XP SP2. However, it can also affect .NET Framework 1.0 and 1.1 installation on any OS released after the .NET Framework 1.0 and 1.1 shipped - specifically, I have seen reports of this issue on Windows Vista. The steps listed here are applicable to this type of install failure on other newer OS's like Windows Vista and not just Windows XP SP2.  

As I was researching the bug in .NET Framework 1.0 and 1.1 that is related to regional language settings on Windows XP SP2 (see this blog post for full details), I discovered an additional issue introduced in Windows XP SP2 that can cause .NET Framework 1.0 or 1.1 setup to fail. Just like the other bugs, this one causes .NET Framework setup to report an error while registering System.EnterpriseServices.dll. In the case of .NET Framework service pack setup, it will cause an error to occur while extracting the service pack to a temporary location before even starting setup.

Windows XP SP2 introduced a new security feature known as Data Execution Prevention (or DEP for short). There is a good article introducing DEP here. If a computer running XP SP2 has hardware that supports DEP and DEP is enabled in boot.ini, installation of the .NET Framework will fail while trying to register System.EnterpriseServices.dll (which happens to be the first time that managed code gets run during setup and therefore is the first time the bug is hit). Also, installation of .NET Framework service packs will fail while trying to extract the service pack setup to a temporary location because the .NET Framework service pack wrapper is written in managed code.

The DEP feature was introduced after the .NET Framework 1.0 and 1.1 shipped and unfortunately the .NET Framework is not compatible with DEP without applying a service pack. Like the language settings bug, this DEP compatibility bug has been fixed in the .NET Framework 1.0 SP3 and 1.1 SP1. However, this bug causes the initial installation of the .NET Framework to fail and rollback, and you cannot install the service pack without first getting the product installed (unless you use a method like I describe here, which will work but is not "officially" supported).

If you are running into this bug on your Windows Vista, Windows Server 2008 or Windows 7 computer, you can use steps like the ones in this blog post to work around this bug in the .NET Framework 1.0 and 1.1 and get it installed. 

If you are running into this bug on your Windows XP SP2 computer, you can use the following steps to work around this bug in the .NET Framework 1.0 and 1.1 and get it installed:

  1. From the Start menu, type sysdm.cpl in the Run box or go to Control Panel and choose the System item
  2. Click the Advanced tab
  3. Click the Settings button in the Startup and Recovery section of this tab
  4. In the Default operating system dropdown, select each option that starts with "Microsoft Windows XP Professional" and change /NoExecute=Optin to /NoExecute=AlwaysOff. This will update the settings in boot.ini on the computer
  5. Click OK
  6. Restart
  7. Install the .NET Framework 1.0 or 1.1
  8. Install .NET Framework 1.0 SP3 or 1.1 SP1
  9. Return to the System control panel, select each option that starts with "Microsoft Windows XP Professional" and change /NoExecute=AlwaysOff back to /NoExecute=Optin

For reference, here is what the Startup and Recovery item in the Advanced tab of the System control panel looks like (this is the screen you will see in step 4 of the instructions above):

System control panel Advanced tab

<update date="4/17/2008"> Added a note indicating that the issue in this post can affect the .NET Framework 1.0 and 1.1 setup on Windows Vista and not just Windows XP SP2 </update>

<update date="6/23/2009"> Fixed broken image link, and added a link to a separate blog post that provides steps for turning DEP on and off on Windows Vista and higher. </update>

Comments

  • Anonymous
    August 26, 2005
    Interesting! I had problems because I (stupidly) installed a VS Studio 2005 beta on my machine, which I've since taken off. I uninstalled 1.1 framework and tried to reinstall. I couldn't do it. I tried this solution and it worked! But now I can't install the 1.1 SP 1.

  • Anonymous
    August 29, 2005
    The comment has been removed

  • Anonymous
    August 31, 2005
    Thanks, I didn't bookmark the other post but I did this one.

    Got it fixed. Fortunately, Windows Update is one "product" that mere mortals can get technical support for without selling a firstborn into slavery. I submitted an incident to them and got instructions on how to finish the job that the .NET Framework uninstaller won't do. And that apparently goes for 1.1 and 2.0 Geez, how hard is it to keep track of what files and registry entries a program (even something as big as the .NET framework) creates and clean them up properly? Is that too much to ask?

    Now Office 2003 sp1 won't install but I have a separate incident for that and I imagine that I will get a new set of instructions for cleaning that up. Why installing and uninstalling the .NET framework should cause problems for Office is another inponderable mystery of the universe.

    Excuse all the sarcasm. But it really hurts to lose a day doing this stuff.



  • Anonymous
    September 01, 2005
    The comment has been removed

  • Anonymous
    November 24, 2005
    I'm not sure if this is the problem I am having or not, but suddenly out of no where, and I am not even sure what prompted it I am getting a DEP error message on boot up at which point I have to click the Dont Send or Cancle button a zillion times to get my machine to actually let me on to the desk top. Do you have an ideas on how I might stop this problem?

  • Anonymous
    November 26, 2005
    Hi Jasmine - I am not sure what could be causing this error. After you boot your system, can you run eventvwr.exe and check your Application and System event logs to see if you have any errors or warnings there that might lead to the root cause?

    Hope this helps....

  • Anonymous
    March 24, 2006
    je veux telecharger le windows xp ps2

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

  • Anonymous
    May 26, 2006
    hi,
    im trying to install .net framework 1.1 but kept getting errors so I tried what you said babove yet kept getting the same error. It was a really long error so i print screened it and hosted it on imageshack, this is the address ;

    http://img77.imageshack.us/img77/6138/netorror8xs.jpg

    Any help would be much appreciated.
    Thank you
    Peter

  • Anonymous
    May 26, 2006
    hi,
    im trying to install .net framework 1.1 but kept getting errors so I tried what you said babove yet kept getting the same error. It was a really long error so i print screened it and hosted it on imageshack, this is the address ;

    http://img77.imageshack.us/img77/6138/netorror8xs.jpg

    Any help would be much appreciated.
    Thank you
    Peter

  • Anonymous
    May 28, 2006
    Hi Peter - The error you are seeing means "function not defined in specified DLL."  Can you please try the steps listed at http://blogs.msdn.com/astebner/archive/2005/10/11/479928.aspx and see if that helps resolve this issue on your system?

  • Anonymous
    May 29, 2006
    Thanks, that fixed it perfectly!!
    great guy!

  • Anonymous
    June 15, 2006
    The comment has been removed

  • Anonymous
    June 15, 2006
    Hi Dino - You are correct that you will need to set /NoExecute=AlwaysOff, then install the .NET Framework 1.1 SP1, then you can set it back to /NoExecute=OptOut.  There is a fix in .NET 1.1 SP1 that allows it to correctly handle NoExecute scenarios.

  • Anonymous
    June 16, 2006
    Aaron,
    THANKS!!! This saved me additional stress. I had been working on this server for the better part of the day, and couldn't find anything on TechNet or the newsgroups.

    Dino

  • Anonymous
    August 03, 2006
    I have tried all the suggested fixes here and continue to have the same problem.  Please let me know how I can find my error file and possibly let you look at it.

  • Anonymous
    August 04, 2006
    Hi Livestrong - I have posted some other suggestions to try to workaround errors related to System.EnterpriseServices.dll at http://blogs.msdn.com/astebner/archive/2006/05/17/600677.aspx.  I would suggest trying those workarounds as well if you haven't yet.

    If none of those work, your best option is to contact Microsoft technical support.  You are entitled to a free support case for setup-related issues such as this.

  • Anonymous
    August 04, 2006
    Hi Astebner,
    Can you pls look at this file
    http://www.financialblessings.info/framework_error.htm  I tried your above workaround and it did not work.  Same error symptom.  Maybe if you look at this MSI*.log file, something will jump out at you??  I am hoping so..
    thanks in advance
    Livestrong

  • Anonymous
    August 05, 2006
    Hi Livestrong - The error log shows that the following is causing your setup to fail:

    CA_ComregEnterpriseServices.3643236F_FC70_11D3_A536_0090278A1BB8: Executing: ERROR: Process returned non-0 value! CMDLINE: "C:WINDOWSMicrosoft.NETFrameworkv1.1.4322RegSvcs.exe" /bootstrapi

    Just to confirm, did you try all of the different suggestions listed at http://blogs.msdn.com/astebner/archive/2006/05/17/600677.aspx?  Or did you only try the one listed in this current blog post?  I cannot tell for sure what you mean when you said you tried my above workaround.  Hopefully one of the other workarounds listed in that other blog post will help here.

    If none of those help, your best option now is to contact Microsoft technical support.  They will be able to provide more detailed troubleshooting suggestions.  You are entitled to a free support case for setup-related issues such as this.  If you find that the other workarounds do not help and you need help getting a hold of them, please contact me using http://blogs.msdn.com/astebner/contact.aspx and I can help you create a support case.

  • Anonymous
    August 05, 2006
    HI,
    Yes, I did add the MSI break, did the optin to alwaysoff, checked the language settings, used the uninstall tool msicuu2.exe, deleting version file under microsoft.netFrameworkvxxx,

  • Anonymous
    August 06, 2006
    Hi Livestrong - Since none of those workarounds helped, your best option now is to contact Microsoft technical support.  They will be able to provide more detailed troubleshooting suggestions.  You are entitled to a free support case for setup-related issues such as this.  If you need help getting a hold of them, please contact me using http://blogs.msdn.com/astebner/contact.aspx and I can help you create a support case.

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

  • Anonymous
    February 04, 2007
    A while ago, I described a .NET Framework 1.0 and 1.1 installation failure that can be caused by the

  • Anonymous
    March 21, 2007
    A little while back, I wrote a blog post describing an interaction issue between Visual Studio setup

  • Anonymous
    September 13, 2007
    The comment has been removed

  • Anonymous
    May 01, 2008
    PingBack from http://marques.newsmediacompany.com/server2003sp2deperror.html

  • Anonymous
    July 17, 2010
    I'm not sure if this post is still checked but I thought I'd give it a try. I was able to install .NET 1.1 by changing /noexecute to alwaysoff, yet when I do the same thing and try to install .NET 1.1 SP1 I get an error that says "This patch package could not be opened. Verify that the patch package exists and that you can access it, or contact the application vendor to verify that this is a valid Windows Install patch package." Any idea how I can get around this? I haven't been able to find any help.

  • Anonymous
    July 18, 2010
    Hi Nate - The error you're seeing from the .NET Framework 1.1 SP1 means that it isn't even able to open the patch to start trying to install it.  I'm not sure what would cause that type of error.  It might help to try to re-download the setup package in case something got corrupted during the original download.  You can also try to download the copy of 1.1 SP1 that I have at cid-27e6a35d1a492af7.office.live.com/.../netfx11sp1.msp.

  • Anonymous
    July 24, 2010
    the link you provided seems to work but I have one more question before I install it. There was a Microsoft Support article (that I can't seem to find now for reference) that linked to the cleanup utility. In the article it said to install the frameworks in the order: 3.5, 1.1, 1.1 SP1 and I believe it said to not install any further updates for them until those 3 were installed first. Since I was having trouble with 1.1 SP1, I had already updated the others so I was wondering do I need to use the cleanup utility again to remove the 2 i have installed and then re-install all 3 over again? Thank you for the help.

  • Anonymous
    July 25, 2010
    Hi Nate - When users run into errors installing the .NET Framework, I typically suggest installing in reverse order (newest first, then oldest) like this article does.  The reason for that is that there are fixes in the newer versions of the .NET Framework that can help the older versions install correctly if they were previously failing.  It doesn't hurt to install updates for the other versions of the .NET Framework first. If you've already installed the .NET Framework 3.5 SP1 and the .NET Framework 1.1 and are still having trouble installing the .NET Framework 1.1 SP1, then I may be able to help further.  Can you please tell me more details about the errors you are seeing during 1.1 SP1 setup?  Also, can you please use the steps listed at blogs.msdn.com/.../help-me-help-you-if-you-have-setup-bugs.aspx to gather a verbose log from the failing 1.1 SP1 setup, upload the log to a file server such as http://skydrive.live.com, and reply back here with a link I can use to download the log and take a look?

  • Anonymous
    July 27, 2010
    The comment has been removed

  • Anonymous
    August 02, 2010
    Hi Nate - The error about no valid source is not caused by the distributed transaction coordinator or the NoExecute settings.  That error typically means that the product was previously installed but it has gotten corrupted somehow.  What I usually suggest trying to do for that type of error is to fully remove all versions of the .NET Framework from your system by using the steps listed at blogs.msdn.com/.../8108332.aspx, then re-install the .NET Framework 3.5 SP1, then the .NET Framework 1.1, then 1.1 SP1. Hopefully this helps!

  • Anonymous
    August 15, 2010
    Sorry for the late response, I recently got back from a vacation with my family. I followed the steps in the link you provided and it worked. It seems to be the same thing that I had done before, so I may have made a mistake last time. I'm currently on step 7, the one that instructs me to download any service packs and/or hotfixes for the .NET framework versions I installed. Since I had only downloaded an installed the versions you said (3.5 SP1, 1.1, and 1.1 SP1,) is there any need to download and install 1.0 SP3? 1.1 SP1 is also listed, but I'm guessing I'm to skip that since I've already installed it. And the 3.5 SP1 family update is the one that I DO need to install, correct? Sorry, I just really want to make sure I've covered everything. Finally, once you respond and I install any of those service packs/hotfixes, would it be fine to proceed with any further updates through Windows Update? Thank you very much for the help, I greatly appreciate it.

  • Anonymous
    August 16, 2010
    Hi Nate - If you already have 1.1 SP1, you should be able to skip installing it again.  If you have 1.0 installed, then I'd suggest installing 1.0 SP3 as well so that you'll have the latest updates.  However, if you don't have 1.0 installed, then you can probably skip that because nearly all applications will automatically use more recent versions of the .NET Framework instead of 1.0 if they are available.  You can see more information about whether or not you need to install older versions of the .NET Framework if you already have newer versions installed in the blog post at blogs.msdn.com/.../9557946.aspx. Yes, it should be fine to proceed with other Windows Updates once you've gotten the .NET Framework versions installed on your system.  Please let me know if you run into any further issues.

  • Anonymous
    February 06, 2012
    Thank you for all your information and your NET clean up tool.  I have now successfully installed all versions and updates. My question is:  I have turned the DEP off, do I need to turn it on again or just leave it disabled? Thank you

  • Anonymous
    February 06, 2012
    Hi Margot Alnwick - In general, I'd suggest changing that DEP setting back to the default value after you've gotten the .NET Framework to install successfully.

  • Anonymous
    February 06, 2012
    Thanks again for all your great information and help. Take care.

  • Anonymous
    June 09, 2013
    The comment has been removed

  • Anonymous
    June 14, 2013
    Hi Dj Mosh - Can you please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your setup log files, upload the file named %temp%vslogs.cab that this tool will create to a file server (such as http://skydrive.live.com), and then reply back here and provide a link that I can use to download your log files and take a closer look?