A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows 7 » Windows 7 Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

What is the easiest way to edit the hosts file on Windows as admin?



 
 
Thread Tools Rate Thread Display Modes
  #1  
Old July 11th 17, 07:56 AM posted to alt.comp.os.windows-10,alt.windows7.general
Lionel Muller
external usenet poster
 
Posts: 119
Default What is the easiest way to edit the hosts file on Windows as admin?

What is the quickest way to edit the hosts file on Windows as admin?

This "shortcut" method (which is almost exactly what we already used for
opening an admin command prompt) worked the very first time, but is there
an easier way to edit the hosts file?

Rightclick in any folder (e.g., the Desktop) New Shortcut
Type a location of "cmd" (or "cmd.exe") sans quotes
Click Next
Type an optional "name" (e.g., "Edit the hosts file")
Click Finish

Rightclick the new Shortcut Properties
Change the Shortcut Target from:
C:\Windows\System32\cmd.exe
Change the Shortcut Target to:
C:\Windows\System32\cmd.exe /K "notepad C:\Windows\System32\Drivers\etc\hosts"

Optionally change the "Start in" directory from:
C:\WINDOWS\system32
Optionally change the "Start in" directory to:
C:\WINDOWS\system32\Drivers\etc\

Press the Advanced button
Check [x]Run as Administrator
Press OK

That successfully creates a cascaded menu shortcut which will edit the
hosts file as administrator.

But is there an easier way?

I will outline the methods that failed, all modeled on the methods we
successfully used to open an admin prompt.
1. hotkey (failed)
2. shortcut (worked)
3. registry (failed)
4. batch file (failed)

The answer is generally useful to everyone so it would be worth our while
to solve this problem with the best solution possible.

What is the quickest way to edit the hosts file on Windows as admin?
Ads
 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 04:27 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.