August 17, 2008

Vista and UAC

Sometimes you have to run certain commands or application as an adminitrator.  And, right-mouse clicking, and then selecting "Runas administrator" isn't too convenient.  There are a few ways to simplify it.  I'll use Vista-Hosts file editing as an example:

1. Use "runas"

From cmd or Windows-Run, type in this:
[sourcecode language='css']
runas /user:administrator "notepad C:\Windows\System32\Drivers\etc\hosts"
This will ask administrator password, however.

2. Use CTRL+SHIFT+Eneter

From Windows-Run, type below:
[sourcecode language='css']
notepad C:\Windows\System32\Drivers\etc\hosts
Then, CTRL+SHIFT+Enter

3. There's a utility, called "Start++".  You can do "sudo" with it:
[sourcecode language='css']
sudo notepad C:\Windows\System32\Drivers\etc\hosts
That's it!

No comments: