How do I edit a system file that seems to be in use?

4

I have tried to edit the file

C:\Windows\System32\drivers\etc\hosts

but Windows always says that the file is in use.

Yazz.com

Posted 2011-01-15T16:09:47.997

Reputation: 2 813

Answers

3

It might be done by running notepad.exe as administrator. The way I do it is by copying the hosts-file into "Copy of hosts", and making the changes in that file. Then I delete the hosts-file (which it will allow for some reason), and rename the copied file to "hosts".

cmbrnt

Posted 2011-01-15T16:09:47.997

Reputation: 200

sorry, I hadnt been to super user for a while :) – Yazz.com – 2011-04-24T12:21:14.733

2

The easiest way is to run any text editor you use as an administrator and then open the file with it.

abney317

Posted 2011-01-15T16:09:47.997

Reputation: 151

1

Open notepad as an administrator, right click on notepad.exe and select "run as administrator", then use File > Open, navigate to the hosts file.

Moab

Posted 2011-01-15T16:09:47.997

Reputation: 54 203