3 ms·
But it's extremely cumbersome from the CLI. RunAs always asks for password for the Administrator account (not the account for the delegated account like sudo).
by larschdk 9y ago
But it's extremely cumbersome from the CLI.
RunAs always asks for password for the Administrator account (not the account for the delegated account like sudo). I have admin access to my work PC, but not the Administrator password (since UAC grants me access). Also, running elevated programs always in separate windows, so you can't redirect their input/output. And CLI program disappear instantly (no time to read the output).
I have used elevate.exe (http://code.kliu.org/misc/elevate/ http://code.kliu.org/misc/elevate/) but sudo seems even better (supports redirecting input/output).
- pawadu 9y ago> I have admin access to my work PC, but not the Administrator password I am not sure if I understand this. Does the machine have two different admin accounts, once of which you have access to?
- dagw 9y agoIn windows you can assign admin access to any account if you wish, kind of like sudo in unix. "Administrator" is a special account, basically like root in unix.
- pawadu 9y agoI am still confused. Can't you specify account name like so? runas /user:Administrator2
- larschdk 9y agoYes, but you need the password then. With admin priviledges you can run "as admin" without needing to know the password. The privileged account still runs programs in normal mode (unprivileged), but can launch programs with elevated permissions.
- pawadu 9y agoSo basically log in as admin and hope you don't press Yes on a UAC dialog by accident? Sounds dangerous to me.
- Const-me 9y agoThe dialog has been designed in a way so that’s almost impossible to press by accident, nor programmatically. Specially dimmed background, characteristic sound, the dialog runs on a dedicated desktop i.e. you won’t see any apps nor the start menu. Also the default button is No i.e. you can’t accidentally press Yes with enter or space keys, you have to use a mouse.