Elevation from Command Line?

Windows Vista

Elevation from Command Line?

Posted by admin on Aug 20th, 2006

Hey there, anyone know how to run a command from CMD in elevated mode (or whatever it's called..!)For example, how would I run SFC /SCANNOW with elevated permissions direct from the command line? I can't be bothered with doing all the createashortcutandtickthoseboxes things... ;)

Responses

  1. anonymous Says:

    I haven't tried it. But intuitively it seems if you click Start > All Programs, rightclick Command Prompt, and choose Run As Administrator, you should be good to go. I think you'll be a system Admin rather than a member of the Local Admins group."ionixuk"

  2. anonymous Says:

    Ahaaa cunning.... :D thanks...!!Anyone aware of a command like runas or runelev or runaway or something like that?"Puppy Breath" wrote:

  3. anonymous Says:

    Create a shortcut to cmd.exe and in the properties pick Always run as administrator. Whenever you run this shortcut it will be elevated. Kerry Brown Microsoft MVP Shell/User vistahelp.ca "ionixuk"

  4. anonymous Says:

    Thanks K yup someone gave me this one earlier.I'm most interested in knowing how to elevate from just one command tho it also seems to me to be the safer option, especially, for example, if you're doing it from a command line batch script, or something..."Kerry Brown" wrote:

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>