Edit system file as administrator

One of the tasks I find myself repeating is editing the hosts file on Windows 8, as Administrator using the third part editor notepad++.

The following command automates this:

powershell -c start -verb runas notepad++.exe C:\Windows\System32\drivers\etc\hosts

Then choose: Edit>Clear Read Only flag from Notepad++ menu.

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.