Hi everyone! IT technicians, as well as web developers, often need to edit the Windows hosts file. This requires starting your favorite editor using elevated privileges (obviously only if UAC is active), browsing for the hosts file which is deep in the windows folder and enclosed in a hidden folder on top of that. For your own machine you can create a shortcut to achieve your goal, but our experience tells us that most people don't bother with it, ending up losing precious minutes every time they must modify the hosts file. What better tool then one that you use every day, which is already running in the notification area, to implement a solution with. If the machines you work on have the same setup, this will work on all of them. Simply create a session with the proper settings.
Steps
- Create a new Command Line session.
- Enter a session name
- Check the Run as Administrator check box.
- Using the ellipsis button, select your editor of choice in the Run text box.
- Paste the following after the name of the program, ensure a blank space separates the two and include the double quotes. "c:WindowsSystem32driversetchosts"
Alternative if you want to use the Parameters tab
Some people want to use the parameters tab because, upon launching, it will display a dialog where you can confirm the value of the parameters and even allows you to change them for whole new values.
Steps 1 to 4 are the same Step 5 - Enter "{1}" after the name of the executable, keeping a space between the two values andincluding the quotes. Step 6 - Uncheck "Use Shell Execute" Step 7 - In the parameters tab, set parameter # 1 type to "Text" Step 8 - Enter the following in the Default Value : c:WindowsSystem32driversetchosts