Can't Update HOSTS File In Windows XP

G

Guest

I am using a program called HOSTS Secure:

HOSTS Secure is a utility that you can use to automatically download, unzip,
and install the MVPS HOSTS file. Features include a scheduler to keep the file
up to Date. Note: requires ".Net Framework 1.1" [screenshot]


When I open Hosts Secure to ‘download the update’ everything starts fine but
the program will only go as far as (the Time – Hosts file extracted) then
another Hosts Secure window pops up with the message:

‘An unhandled exception has occurred in your application. If you click
Continue, the application will ignore this error and attempt to continue. If
you click Quit, the application will be shut down immediately.
Access to the path “C:\WINDOWS\system32\etc\HOSTS†is denied.

When I click on ‘Continue’ nothing happens. When I click on details this is
what I get:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path
"C:\WINDOWS\system32\drivers\etc\HOSTS" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.File.InternalCopy(String sourceFileName, String
destFileName, Boolean overwrite)
at cc.c(Boolean A_0)
at cc.s(Object A_0, EventArgs A_1)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
HOSTS_Secure
Assembly Version: 1.0.2155.3912
Win32 Version: 1.0.2155.3912
CodeBase: file:///C:/Program%20Files/HOSTS%20Secure/HOSTS_Secure.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3052.4
CodeBase:
file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.


I have tried to enter the new hosts file manually, like Mike Burgess says on
his web site: http://www.mvps.org/winhelp2002/hosts.htm and I had been doing
it that way before I found HOSTS Secure, but now it will not copy it since
using HOSTS Secure this last time. It shows in C:\WINDOWS\system32\etc\HOSTS
that the new file is in there, but it shows it as “HOSTS.txtâ€, but it will
not replace the older HOSTS file with the newer one. I have put HOSTS Secure
on my brother’s computer also and he clicked on it and now gets the same
message. I have no idea what’s going on. Can you please give me some
guidance on this matter. We have used it to update once or twice before and
had no problems. I’m not sure what it’s telling you to do with the message
below:


************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

I wrote to Mike Burgess and he said I needed to write to the HOSTS Secure
administrator, which I did but I got no answer. I am now posting to this
board and would really appreciate anything anyone can do to help.

Thank you
 
V

Vanguard

allen642 said:
I am using a program called HOSTS Secure:

HOSTS Secure is a utility that you can use to automatically
download, unzip,
and install the MVPS HOSTS file. Features include a scheduler to
keep the file
up to Date. Note: requires ".Net Framework 1.1" [screenshot]


When I open Hosts Secure to ‘download the update’ everything starts
fine but
the program will only go as far as (the Time – Hosts file extracted)
then
another Hosts Secure window pops up with the message:

‘An unhandled exception has occurred in your application. If you
click
Continue, the application will ignore this error and attempt to
continue. If
you click Quit, the application will be shut down immediately.
Access to the path “C:\WINDOWS\system32\etc\HOSTS†is denied.

<snip>

So is the read-only attribute set on that file? Do you have other
anti-malware software installed that locks the hosts file? Spybot has
that feature but only if you waste the memory to leave its TeaTimer
loaded all the time (there are better IPS products than TeaTimer).
Could be you have MS Defender, Prevx, some anti-virus suite that
includes IPS-like functions, or something else that is protecting the
hosts file.
 
M

mikeyhsd

its possible your virus program is causing the problem.
disable it , reboot and try the host update again.



(e-mail address removed)



I am using a program called HOSTS Secure:

HOSTS Secure is a utility that you can use to automatically download, unzip,
and install the MVPS HOSTS file. Features include a scheduler to keep the file
up to Date. Note: requires ".Net Framework 1.1" [screenshot]


When I open Hosts Secure to ‘download the update’ everything starts fine but
the program will only go as far as (the Time – Hosts file extracted) then
another Hosts Secure window pops up with the message:

‘An unhandled exception has occurred in your application. If you click
Continue, the application will ignore this error and attempt to continue. If
you click Quit, the application will be shut down immediately.
Access to the path “C:\WINDOWS\system32\etc\HOSTS†is denied.

When I click on ‘Continue’ nothing happens. When I click on details this is
what I get:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path
"C:\WINDOWS\system32\drivers\etc\HOSTS" is denied.
at System.IO.__Error.WinIOError(Int32 errorCode, String str)
at System.IO.File.InternalCopy(String sourceFileName, String
destFileName, Boolean overwrite)
at cc.c(Boolean A_0)
at cc.s(Object A_0, EventArgs A_1)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/microsoft.net/framework/v1.1.4322/mscorlib.dll
----------------------------------------
HOSTS_Secure
Assembly Version: 1.0.2155.3912
Win32 Version: 1.0.2155.3912
CodeBase: file:///C:/Program%20Files/HOSTS%20Secure/HOSTS_Secure.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.windows.forms/1.0.5000.0__b77a5c561934e089/system.windows.forms.dll
----------------------------------------
System
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system/1.0.5000.0__b77a5c561934e089/system.dll
----------------------------------------
System.Data
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.data/1.0.5000.0__b77a5c561934e089/system.data.dll
----------------------------------------
System.Xml
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.xml/1.0.5000.0__b77a5c561934e089/system.xml.dll
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 7.0.5000.0
Win32 Version: 7.10.3052.4
CodeBase:
file:///c:/windows/assembly/gac/microsoft.visualbasic/7.0.5000.0__b03f5f7f11d50a3a/microsoft.visualbasic.dll
----------------------------------------
System.Drawing
Assembly Version: 1.0.5000.0
Win32 Version: 1.1.4322.573
CodeBase:
file:///c:/windows/assembly/gac/system.drawing/1.0.5000.0__b03f5f7f11d50a3a/system.drawing.dll
----------------------------------------

************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.


I have tried to enter the new hosts file manually, like Mike Burgess says on
his web site: http://www.mvps.org/winhelp2002/hosts.htm and I had been doing
it that way before I found HOSTS Secure, but now it will not copy it since
using HOSTS Secure this last time. It shows in C:\WINDOWS\system32\etc\HOSTS
that the new file is in there, but it shows it as “HOSTS.txtâ€, but it will
not replace the older HOSTS file with the newer one. I have put HOSTS Secure
on my brother’s computer also and he clicked on it and now gets the same
message. I have no idea what’s going on. Can you please give me some
guidance on this matter. We have used it to update once or twice before and
had no problems. I’m not sure what it’s telling you to do with the message
below:


************** JIT Debugging **************
To enable just in time (JIT) debugging, the config file for this
application or machine (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging enabled.

For example:

<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the machine
rather than being handled by this dialog.

I wrote to Mike Burgess and he said I needed to write to the HOSTS Secure
administrator, which I did but I got no answer. I am now posting to this
board and would really appreciate anything anyone can do to help.

Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top