I'm using MVPS HOSTS and it works properly. In addition I use MVPS' RenHosts.bat to turn Hosts on/off when needed, but now I can't do it as I get the following error message about a duplicate file:



A search for Hosts in C:\ gives me this results:





I'm not allowed to rename/delete etc. the Hosts file in C:\Windows\w_microsoftinsxs\amd64............... despite I'm the owner and it doesn't help with "Take ownership" either:



I don't know when and how it became impossible to have the RenHosts.bat to work properly as it once did. Now I hope someone in here is able to solve this for me.

This is the RenHosts.bat file which resides in C:\Windows:


@echo off
cls
goto toggleRename
:toggleRename
If Not %winbootdir%'==' Set HostsOff=%windir%\NOHOSTS
If %OS%'==Windows_NT' Set HostsOff=%SystemRoot%\system32\drivers\etc\NOHOSTS
If %HostsOff%'==' goto noIdeaOfOS

If Not %winbootdir%'==' Set HostsOn=%windir%\HOSTS
If %OS%'==Windows_NT' Set HostsOn=%SystemRoot%\system32\drivers\etc\HOSTS
If %HostsOn%'==' goto noIdeaOfOS

If Not Exist %HostsOff% goto deActivate
goto Activate
goto end

:deActivate
color 4F
if not exist %HostsOn% goto noHostsFile
ren %HostsOn% NOHOSTS
echo.
echo
echo Ŀ
echo HOSTS FILE BLOCKING IS NOW DE-ACTIVATED X
echo
echo.
echo.
echo. Advertising will be visible; Parasite protection off!
echo Renamed from HOSTS to NOHOSTS
echo.
goto end

:Activate
color 1F
if not exist %HostsOff% goto noHostsFile
ren %HostsOff% HOSTS
echo.
echo
echo Ŀ
echo HOSTS FILE BLOCKING IS NOW ACTIVATED
echo
echo.
echo.
echo. Advertising will be hidden; Parasite protection on!
echo Renamed from NOHOSTS to HOSTS
echo.
goto end

:noIdeaOfOS
echo Sorry Unsupported OS.
goto end

:noHostsFile
cls
echo.
echo
echo Ŀ
echo ERROR NO HOST FILES FOUND ! !
echo
echo.
echo .
echo Couldn't find "HOSTS" or "NOHOSTS" in the folder
echo.
echo please check that the HOSTS file is in this folder
echo thanks..
:end
set HostsOff=
set HostsOn=
pause
exit