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. |
|
|
Thread Tools | Rate Thread | Display Modes |
#1
|
|||
|
|||
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 |
|
|