Run a command as Administrator under Windows

August 10th, 2009 by Xerxes Leave a reply »

To run any command under the credentials of a different user, *nix systems have the sudo command. For example:

$> sudo pico /etc/hostname

To run a program under the credentials of a different user under Windows, you can use the runas command.

runas /user:administrator notepad

i use this command to quickly create batch files which i can drop into my c:\windows\system32 folder for immediate path happiness

Bookmark this post:
  • DotNetKicks
  • DZone
  • TwitThis
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • MySpace
  • Slashdot
  • StumbleUpon
  • Technorati

Related posts:

  1. Opening a file in your favourite editor from the command line This post serves as a reminder for myself. I use...
  2. Root Priviledge Escalation in Windows I have just uncovered a way to perform root priviledge...
  3. Relocating Your Windows Profile To A Different Location In the last few OS rebuilds of my machine, i’ve...
  4. Switching an IIS website home directory from the command line The title says it all. The problem was simple –...
  5. How to Create The Ultimate Windows XP Installation CD/DVD http://www.anewmorning.com/2008/01/30/how-to-create-the-ultimate-windows-xp-installation-cddvd/ My laptop is in the perfect condition to try...

Comments are closed.