Welcome to MSDN Blogs Sign in | Join | Help

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>

 

Published Wednesday, July 27, 2005 3:59 PM by astebner

Comments

Friday, August 26, 2005 8:22 PM by Jimmy Neutron

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

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.
Tuesday, August 30, 2005 1:34 AM by astebner

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

Hi Jimmy - I saw your comment on my other blog post, and I'm going to duplicate the response here in case you don't check the other location. I'm sorry you're still having trouble getting .NET Framework 1.1 SP1 to install correctly. Could you send me the exact error message you are receiving so I could research this further? Also, you may want to check out the troubleshooting guide I previously published for resolving some .NET 1.1 SP1 errors. You can find it at http://blogs.msdn.com/astebner/archive/2004/11/23/268934.aspx

Wednesday, August 31, 2005 5:03 PM by Jimmy Neutron

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

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.



Thursday, September 01, 2005 11:47 PM by astebner

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

Hi Jimmy - I hope you still have this post bookmarked and are reading the comments. If you don't mind, could you share the solution that allowed you to install .NET 1.1 SP1 so that others might benefit from your experience?

I apologize for the pain that you've encountered while trying to get all of these various patches and service packs installed. It is experiences like yours that provide me motivation to continue to seek ways to improve and to blog about known issues and workarounds in our products....
Thursday, November 24, 2005 5:33 PM by Jasmine

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

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?
Saturday, November 26, 2005 9:52 PM by astebner

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

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....
Saturday, March 25, 2006 4:49 AM by ilyass

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

je veux telecharger le windows xp ps2
Thursday, May 18, 2006 1:48 AM by Aaron Stebner's WebLog

# Workaround for possible timing issue that can cause .NET Framework setup failures

I got an email from the .NET Framework setup technical support team today with some more information...
Friday, May 26, 2006 12:34 PM by peter lynch

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

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
Friday, May 26, 2006 12:34 PM by peter lynch

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

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
Sunday, May 28, 2006 3:20 PM by astebner

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

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?
Monday, May 29, 2006 1:07 PM by peter lynch

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

Thanks, that fixed it perfectly!!
great guy!
Thursday, June 15, 2006 4:31 PM by Dino

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

The above worked for me on Windows Server 2003 x64 running on an Opteron. Although my boot.ini file had /NoExecute=Optout . I changed it to AlwaysOff and the bugger finally installed. I am guessing that I need to install .net 1.1 SP1 and then I can change the NoExecute back to OptOut?

Thanks,
Dino
Friday, June 16, 2006 12:35 AM by astebner

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

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.
Friday, June 16, 2006 8:26 AM by Dino

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

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
Friday, August 04, 2006 5:04 AM by livestrong

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

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.
Friday, August 04, 2006 1:52 PM by astebner

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

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.
Saturday, August 05, 2006 6:26 AM by livestrong

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

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
Saturday, August 05, 2006 12:02 PM by astebner

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

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:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\RegSvcs.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.
Saturday, August 05, 2006 2:17 PM by livestrong

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

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.net\Framework\vxxx,
Sunday, August 06, 2006 11:40 PM by astebner

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

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.
Friday, November 17, 2006 1:17 PM by Aaron Stebner's WebLog

# Workaround for possible timing issue that can cause .NET Framework setup failures

I got an email from the .NET Framework setup technical support team today with some more information

Sunday, February 04, 2007 2:05 PM by Aaron Stebner's WebLog

# Error installing .NET Framework 1.0 and 1.1 on Windows Vista caused by Data Execution Prevention (DEP)

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

Wednesday, March 21, 2007 11:50 PM by Aaron Stebner's WebLog

# Tenebril SpyCatcher can cause .NET Framework setup to hang

A little while back, I wrote a blog post describing an interaction issue between Visual Studio setup

Thursday, September 13, 2007 4:59 PM by Aaron Stebner's WebLog

# Unified .NET Framework Troubleshooting Guide

Details about the .NET Framework 2.0 setup packaging Available command line switches for .NET Framework

Thursday, May 01, 2008 9:12 AM by server 2003 sp2 dep error

# server 2003 sp2 dep error

Anonymous comments are disabled
 
Page view tracker