Avatar of thebest8
thebest8
 asked on

Can't Edit hosts file in Windows 10

Hello,

I was trying to add a line in hosts file to adjust a domain name with wamp server but it doesn't allow me to, I get access denied and another error: The process cannot access the file because it is being used by another process...

I tried many ways through this link http://windowsreport.com/access-denied-hosts-windows-10/

But still doesn't work. I have Avira Antivirus and ZoneAlarm firewall all disabled and still something is missing
Windows 10Windows OS

Avatar of undefined
Last Comment
thebest8

8/22/2022 - Mon
SOLUTION
max_the_king

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Radhakrishnan

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
McKnife

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
John

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Abhilash Pappiyil

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
thebest8

ASKER
Still didn't fix it, I have attached several screenshot for you to check, it doesn't work with Run as Administrator
cap1.JPG
cap2.JPG
cap3.JPG
cap4.JPG
Cap5.JPG
Cap6.JPG
arnold

what are you running as administrator?
try the suggested solution, save a copy of the modified hosts file. then copy it using file explorer and once prompted provide admin credentials and you should be done.

What happens after you click the OK to elevate your rights in cat6.jpg?
John

The attributes on the file are correct. Let's cover the instructions again.

Right Click on Notepad.exe and select Run as Administrator. Does this work?  Are you challenged for credentials?  if so, then authorize. Make this entire step is completed.

Now inside Notepad, navigate to HOSTS and open it. There is more than one HOSTS file - make sure you select the active one.

Now edit and save.
Your help has saved me hundreds of hours of internet surfing.
fblack61
McKnife

cap3.jpg shows, that some other process has locked this file (which is not normal). Do you have that hosts file open in anything else but notepad at the same time? If in doubt, logoff and on again and repeat what you just did.
thebest8

ASKER
Ok I found the solution to it.

The issue is coming from ZoneAlarm and Avira Antivirus locking hosts file

check screenshot
cap7.JPG
cap8.JPG
John

Avira has caused more than one problem in here. Safety by preventing people from working.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
thebest8

ASKER
thank you all
John

You are very welcome and thank for your helpful update. I was happy to work with you on this.
thebest8

ASKER
thank you Mr John
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck