9
1
If I want to open Notepad and edit the hosts
file, I have to invoke the Start menu, find the Notepad shortcut, right click and run as administrator, then open the hosts
file in Notepad in order to edit.
Is there a way to use the command line to open Notepad as administrator? Something like press win + R and enter notepad /admin
. Is this possible?
Appreciated! It's strange that
runas /env /user:DOMAIN\ADMINNAME "notepad hosts"
asks for the admin password, but when saving it still does not have enough permissions. YourCtrl+Shift+Enter
solution seems to give the right access: it worked for me :) – Armfoot – 2015-09-09T11:17:55.390