#SharePoint 2010 Installation failure “Couldn’t find file c:\Windows\System32\drivers\etc\hosts”

Sometimes while you are removing SharePoint 2010 server from your machine and re-install it  , and run the SharePoint 2010 products configuration wizard in the 4th step you may face ,this error “Couldn’t find file c:\Windows\System32\drivers\etc\hosts” or even couldn’t access it, the reason i think is that “hosts” file which path is in “c:\Windows\System32\drivers\etc\” may be deleted or modified, during removing your SharePoint installation by the SharePoint timer service, So     what we shall do is re-creating this file again?

i’m not going to discuss the function of this file you can found it by “Google” it :).

step-1: go to the following path:”c:\Windows\System32\drivers\etc\”, and create a new text file, and insert the following text inside it:

# Copyright (c) 1993-2008 Microsoft Corp.
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
# For example:
#     rhino.acme.com          # source server
#     x.acme.com              # x client host       localhost

This is a typical content though the only important part is this line ”   localhost”.

step-2 Save this file as hosts but remove the .txt extension

Now the last step is  to apply appropriate permissions for WSS_Admin_WPG to it.  If you don’t, you are just going to encounter another error (This time a permission error: Access to the path ‘C:\WINDOWS\system32\drivers\etc\HOSTS’ is denied). 

To do so, just right click the hosts file and select properties then,  security tab, then edit, then Add..,then  type WSS_Admin_WPG and click check names and ok, don’t forget to allow modify option like below:

Now re-run the SharePoint 2010 products configuration wizard again and i hope that your installation successfully complete .


About Hossam Kamal

Hossam Kamal Senior SharePoint Developer with high development skills in C#, ASP.NET, SharePoint Server Technologies, jQuery, CSS, XML, O.O.D, SSRS and MS.SQL Server.
This entry was posted in SharePoint General. Bookmark the permalink.

2 Responses to #SharePoint 2010 Installation failure “Couldn’t find file c:\Windows\System32\drivers\etc\hosts”

  1. Ahmed Eldesokey says:

    good job dude 🙂 بالتوفيق الى الامام ان شاء الله يا حس

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s