New
#10
HUGE request.
Can anyone turn
wsl_here_ubuntu.exe.reg
into
enable_open_bash_here_context_menu.reg
basically i want the functionality of the latter, but with calling ubuntu as admin instead of the generic. Expanding on the former perhaps we'll call it?
without knowing exactly what im looking at, and using a hex translator - it seems to work only on blank space, and uses ubuntu.exe -c bash as the command but i have no idea how to turn that into an "as admin" version across the board like the other script.
If anyone can do so without much effort id be very grateful!
Hello mate,
Here you go. You can give this below a try to see how it may work for you.
wsl_here_ubuntu_as_admin.reg
Code:Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\Background\shell\wsl] @="Open WSL shell here as administrator" "Extended"="" [HKEY_CLASSES_ROOT\Directory\Background\shell\wsl\command] @="PowerShell -windowstyle hidden -Command \"Start-Process cmd -ArgumentList '/s,/k,pushd,%V && ubuntu.exe -c bash' -Verb RunAs\""
Hey thank you brink. I'll give that a shot right away. All i needed was the command portion to supplant into the other. I had tried with changing out bash.exe for ubuntu.exe which worked, but seemed to just open the bash window.
I imagine the -c bash is what I was missing. I wasnt sure if anything else would change and figured id better ask before i create a mess in my registry :)
will report back shortly!
- - - Updated - - -
ok, that seems to be working :) That was the easy one. If you can solve this one, I'm forever in your debt and groveling! honestly. Believe it or not. I've been at this since 9am. Done two complete purges and image restores on two machines all in an attempt to get this working. 9 hours later and im feeling defeated having wasted an entire day.
I dont know if your familiar with linux, or if thats even relevant, but here goes.
open_with_bash_stay_open.reg
that works perfectly to double click and run a .bash script. The problem is, when I click the "run as administrator" portion, I used to be greeted with the terminal window asking for my sudo password, the intended behavior.
Now, im greeted with
I'm unsure if something fundamental changed with the runas portion of the reg file, or if its something else.
I have to concede to the pros
When I tried it, cmd says "'bash.exe' is not recognized as an internal or external command,
operable program or batch file."
I'm running Windows 10 pro, version 1909 (OS build 18363.752)
Do I need to download & install bash, or is something else wrong?
Hello Sam.,
Correct. The "Open Bash window here" context menu item requires that Bash on Unbunto is enabled to work..