As a developer, I find myself editing the
hosts file quite often to add a local virtual host.
hosts file needs to be edited as an administrator, I have to:
- Click on the start menu
- Right-click on the notepad icon, click Run as administrator
- Click Yes
- Then Open...
I've tried to create a shortcut to the
hosts file on the desktop, then right-click it to change the shortcut advanced properties, but I can't select Run as administrator.
I guess this is because I'm creating a shortcut to a file, and not to the
How can I create a shortcut to notepad that runs as an administrator and opens the hosts file? It's OK if I have to click Yes every time to confirm that I want to run the program as an administrator.