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"
[/sourcecode]
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
[/sourcecode]
Then, CTRL+SHIFT+Enter


3. There's a utility, called "Start++".  You can do "sudo" with it:
http://brandonlive.com/2007/02/22/new-tool-i-made-for-vista-start/
[sourcecode language='css']
sudo notepad C:\Windows\System32\Drivers\etc\hosts
[/sourcecode]
That's it!

No comments:

Post a Comment