Tot trebuie un click aici, click acolo, dar hey
1 Like
Am dat aici o soluție pentru sudo, un snippet de 3 rânduri:
function sudo() {
$curDir = (Get-Location).path
powershell -command "Start-Process cmd -ArgumentList '/c cd /d $curDir && $args & pause' -Verb runas"
}
Noutatea este că ai opțiunea să rulezi inline, nu într-o fereastră nouă, iar modul în care se întâmplă asta este foarte interesant:
In these configurations, sudo.exe will launch a new elevated process, an elevated sudo.exe process, and the original unelevated sudo.exe will establish an RPC connection with the new elevated process. In other words, information is passed from the unelevated sudo instance to the elevated one.
1 Like
Am urmarit clipul de prezentare, e o prostie ce au facut ei acolo. Enable sudo
si sudo sudo
sunt hilare. Ei incearca sa imite comportamentul unei comenzi neintelegand de fapt motivul existentei ei.
1 Like
1 Like