Open Hosts File ?

  • Thread starter Thread starter nr
  • Start date Start date
N

nr

Is there any way I can set up which application to use as the default
to open the Hosts file, as one can do with txt or doc files? I'm
running SP3.

Thanks for any help.
 
nr said:
Is there any way I can set up which application to use as the default
to open the Hosts file, as one can do with txt or doc files? I'm
running SP3.

Thanks for any help.


Try Hostsman v. 3.1. 57

http://www.softpedia.com/get/Network-Tools/Misc-Networking-Tools/HostsMan.shtml


--
Mike Hall - MVP
How to construct a good post..
http://dts-l.com/goodpost.htm
How to use the Microsoft Product Support Newsgroups..
http://support.microsoft.com/default.aspx?pr=newswhelp&style=toc
Mike's Window - My Blog..
http://msmvps.com/blogs/mikehall/default.aspx
 
nr said:
Is there any way I can set up which application to use as the default
to open the Hosts file, as one can do with txt or doc files? I'm
running SP3.

Thanks for any help.

Winpatrol and Spybot will open it.
 
nr said:
Is there any way I can set up which application to use as the default
to open the Hosts file, as one can do with txt or doc files? I'm
running SP3.

If your C: drive is NTFS then read on...

- Install NTFSLink from http://elsdoerfer.name/=ntfslink
- Create a hardlink from your hosts file to the file "hosts.txt"
- Open hosts.txt instead of hosts. It's the same file.

You can put the "hosts.txt" link anywhere on your C: drive, it can be
somewhere much more easy to remember than C:\WINDOWS\system32\drivers\etc
 
If your C: drive is NTFS then read on...

- Install NTFSLink fromhttp://elsdoerfer.name/=ntfslink
- Create a hardlink from your hosts file to the file "hosts.txt"
- Open hosts.txt instead of hosts. It's the same file.

You can put the "hosts.txt" link anywhere on your C: drive, it can be
somewhere much more easy to remember than C:\WINDOWS\system32\drivers\etc

Thanks for the reply, but the files is not a TXT file, there is no
extension. That's why I asked the question. Ramesh has provided a
great solution.
 
Option 1: Create a desktop shortcut with the following Command Line to open
HOSTS file in Notepad.

Notepad.exe "%systemroot%\system32\drivers\etc\HOSTS"

Option 2: How to associate Notepad to open files with no extension:http://www.winhelponline.com/articles/67/1/How-to-associate-Notepad-t...

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Bloghttp://www.winhelponline.com/blog

Ramesh,

Thank you very much for this valuable information. Both items worked
as expected.

On your Option 2, I tried substituting a link to PSPad instead of
Notepad, but it didn't work. Should I be able to do this? I changed
this line:
@="Notepad.exe %1"
to this
@="C:\Program Files\PSPad editor\PSPad.exe %1"

Thanks again.
 
nr said:
Thanks for the reply, but the files is not a TXT file, there is no
extension. That's why I asked the question.

I know that, which is why you would create a hard link to the file as
"hosts.txt".
Then, you open hosts.txt, but in fact you are opening "hosts", and any
changes you make in hosts.txt are actually being made in "hosts" as
well, because they are the same file.
It's a very versatile technique (probably used mostly by people familiar
with Linux or OS/2), and avoids tinkering with the registry, something I
always avoid, if possible.
 
nr said:
Winpatrol and Spybot will open it.

Notepad or any straight ASCII editor can be used to open it. Writing a
small batch file to edit it with Notepad is one way. As someone else
mentioned, Winpatrol & Spybot, althought that's not their purpose, can
also look at it.

Twayne
 
@="C:\Program Files\PSPad editor\PSPad.exe %1"

Change that to:

@="C:\Program Files\PSPad editor\PSPad.exe" "%1"

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Blog http://www.winhelponline.com/blog


nr said:
Option 1: Create a desktop shortcut with the following Command Line to
open
HOSTS file in Notepad.

Notepad.exe "%systemroot%\system32\drivers\etc\HOSTS"

Option 2: How to associate Notepad to open files with no
extension:http://www.winhelponline.com/articles/67/1/How-to-associate-Notepad-t...

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows Shell/User]
The Winhelponline Bloghttp://www.winhelponline.com/blog

Ramesh,

Thank you very much for this valuable information. Both items worked
as expected.

On your Option 2, I tried substituting a link to PSPad instead of
Notepad, but it didn't work. Should I be able to do this? I changed
this line:
@="Notepad.exe %1"
to this
@="C:\Program Files\PSPad editor\PSPad.exe %1"

Thanks again.
 
Back
Top