Yesterday someone asked me if I knew a Windows built-in way to have some sort of SUDO to elevate from the CMD prompt, so you could do things like sudo regedit, sudo xxx.cpl, sudo xxx.mmc or even sudo del abc.txt.
I didn't and as it was a slow day, we decided to team up: he would google for it and I would try to come up with something. Google didn't give us anything (other than external utilities and a lot of people asking the same question), but I did find a way.
It was still a little rough around the edges (to my taste), but he was happy.
I'm considering posting it here, but as it requires more work on it, translation to English and it is quite off-topic here (in TCC you could just do something like alias sudo=start /elevated /pgm; Powershell is trivial too). Beside all that: the general interest in the other scripts I penned down here are downloaded in single digits numbers, so there might be no interest at all in this one.
Before going through all the effort: is there any interest in a SUDO for CMD?
I didn't and as it was a slow day, we decided to team up: he would google for it and I would try to come up with something. Google didn't give us anything (other than external utilities and a lot of people asking the same question), but I did find a way.
It was still a little rough around the edges (to my taste), but he was happy.
I'm considering posting it here, but as it requires more work on it, translation to English and it is quite off-topic here (in TCC you could just do something like alias sudo=start /elevated /pgm; Powershell is trivial too). Beside all that: the general interest in the other scripts I penned down here are downloaded in single digits numbers, so there might be no interest at all in this one.
Before going through all the effort: is there any interest in a SUDO for CMD?
Last edited: