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 Data Execution Prevention (DEP) feature that was introduced in Windows XP SP2.  My previous blog post about this topic stated that this DEP issue can affect .NET Framework 1.0/1.1 setup on Windows XP SP2.  However, this issue can cause installation failures on all operating systems that include the DEP feature, including Windows Server 2003 SP1 and Windows Vista.


As I described in my previous blog post, the DEP feature was introduced after the .NET Framework 1.0 and 1.1 shipped, and the original releases of the .NET Framework 1.0 and 1.1 are not compatible with DEP.  This DEP compatibility bug has been fixed in the .NET Framework 1.0 SP3 and 1.1 SP1.  However, this issue can cause the initial installation of the .NET Framework 1.0 and 1.1 to fail and rollback, and you cannot install the service pack without first getting the product installed (unless you use a method like creating a combined administrative install point, which will work but is not “officially” supported).


To workaround this issue, you can temporarily disable DEP, install the .NET Framework 1.0 or 1.1 and then re-enable DEP.  The method of disabling DEP on Windows XP SP2 is described in the previous blog post, but it has been changed in Windows Vista.


The following steps can be used to disable Data Execution Prevention (DEP) on Windows Vista:



  1. Click on the Start menu, choose All Programs, then Accessories, then right-click on the Command Prompt item and choose Run as administrator
  2. Click Continue to grant permission to launch a cmd prompt with administrator privileges
  3. Run the command bcdedit.exe /set nx AlwaysOff
  4. After running the command, you should see a message in the cmd prompt stating The operation completed successfully
  5. Restart the computer

The following steps can be used to re-enable Data Execution Prevention (DEP) on Windows Vista:



  1. Click on the Start menu, choose All Programs, then Accessories, then right-click on the Command Prompt item and choose Run as administrator

  2. Click Continue to grant permission to launch a cmd prompt with administrator privileges
  3. Run the command bcdedit.exe /set nx OptIn
  4. After running the command, you should see a message in the cmd prompt stating The operation completed successfully
  5. Restart the computer

Note – this issue will not affect all Windows Vista systems.  DEP is hardware-enforced and not all CPUs are compatible with it.  However, if you are having trouble installing the .NET Framework 1.0 or 1.1 on Windows Vista and installation fails while trying to register System.EnterpriseServices.dll, it is worth trying the above workaround in case you do have a DEP-compatible system.


<update date=”11/13/2008″> Updated bcdedit.exe command lines slightly.  They used to say bcdedit.exe /set {current} nx AlwaysOff and bcdedit.exe /set {current} nx OptIn.  However, the {current} switch can be omitted and bcdedit.exe will automatically apply the setting change to the boot entry for the currently running OS. </update>


 

Comments (5)

  1. cartpauj says:

    Help me please, I’ve tried everything I can find to get .net 1.0 or 1.1 to install on vista. at one point I had 1.1 and 2.0 plus 3.0 which comes with vista installed but I had some errors so I uninstalled 1.1 and 2.0 but I cannot re-intall 1.1 and I really need it for some software. I’ve tried renaming mscoree.dll and I’ve tried disabling DEP but it still fails near the end of the installation. Somebody please give me some more ideas.

    Thanks

  2. Hi Cartpauj – Windows Vista comes with the .NET Framework 2.0 and 3.0.  It is possible to uninstall 3.0 but not 2.0, so I’m not sure how you uninstalled 2.0 as you described above.  I think you may want to try to repair the OS files on your system using the steps listed at http://blogs.msdn.com/astebner/archive/2007/03/26/how-to-repair-the-net-framework-2-0-and-3-0-on-windows-vista.aspx and see if that helps.

    Also, if you are missing the registry values listed for the .NET Framework 2.0 at http://blogs.msdn.com/astebner/archive/2007/06/12/3260076.aspx, please add those back as well.

    If the above do not help, please use the steps listed at http://blogs.msdn.com/astebner/archive/2005/03/29/help-me-help-you-if-you-have-setup-bugs.aspx to gather a verbose log file from the failing 1.0/1.1 install and zip and send them to me at Aaron.Stebner (at) microsoft (dot) com so I can take a look.

  3. chris stubbs says:

    DO NOT DO THIS

    there is a high chance of you getting a blue screen next time you boot that windows cant repair

  4. Hi Chris Stubbs – I'm sorry for the experience you had after trying these steps.  Yours is the first case I've heard of the steps in this blog post causing any kind of problem like that though.  What version of Windows are you running, and did you see any errors when running the commands before you rebooted?