Aaron Stebner's WebLog

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

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

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

  • Comments 39

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>

 

  • 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.
  • 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

  • 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.



  • 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....
  • 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?
  • 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....
  • je veux telecharger le windows xp ps2
  • I got an email from the .NET Framework setup technical support team today with some more information...
  • 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
  • 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
  • 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?
  • Thanks, that fixed it perfectly!!
    great guy!
  • 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
  • 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.
  • 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
Page 1 of 3 (39 items) 123
Leave a Comment
  • Please add 7 and 5 and type the answer here:
  • Post