Open luke-beep opened 8 months ago
This seems like it would be super easy, at least on it's face. Currently, sudo
spawns an elevated sudo
(which gets a hidden, elevated console). Then we have the admin sudo detach from its console, and attach to the original one instead.
If we just... didn't do that detach/reattach dance, that would probably just work? The target would be connected to a hidden console window. I'm betting this should be easy.
I'd wanna double check
sudo -b
could then ShowWindow(GetConsoleWindow())
to show the hidden console.
Description of the new feature / enhancement
The original Unix
sudo
command line utility supports a-b/-background
option, which tells sudo to run the given command in the background.Scenario when this would be used?
Simplify Task Delegation with Sudo's -b Option on Windows.
Example: In the routine of a system administrator, tasks like software updates and network adjustments are common. With the -b option in sudo, these tasks become more "streamlined"; easier to perform without the visual clutter. For instance, executing
sudo -b winget upgrade --all
allows for background updates of the system's software, eliminating the need for visual clutter and saving valuable time.By leveraging the
-b/-background
option with sudo, administrators & casuals can streamline task delegation and improve efficiency in system management. It'd also be very useful to me <3Supporting information