Always run cmd via ConEmu as administrator
Asked Answered
S

5

18

I'm using ConEmu and I want to always have my cmds run as administrator.

I've changed the settings that forces all my cmds to run through ConEmu, so typing 'cmd' in the Windows Run will open ConEmu (Settings -> Integration -> Default term -> Force ConEmu as default terminal)

I've tried changing the (Settings -> Startup -> Command line) to cmd.exe -new_console:a which works for shortcuts but doesn't change the default (running cmd from Run or opening a new tab inside ConEmu)

Thanks

Sitology answered 23/6, 2016 at 12:22 Comment(0)
M
9

ConEmu does not change the command you run. That would be strange, if you run from Win+R the cmd.exe and get started in ConEmu powershell.exe, for example. Isn't it?

Same with elevation level. ConEmu starts console application at the level user requested. This is the only logical behavior.

Want elevated cmd? Set up elevated cmd task as startup task for ConEmu and run ConEmu instead of cmd.

Well, alternatively, you may run from Win+R cmd -new_console:a or just call "run cmd as Administrator" to let ConEmu know what do you want exactly.

Mixer answered 23/6, 2016 at 13:0 Comment(0)
M
30

For me it works to change the specified named Tasks in Settings->Startup to {Shells::cmd (Admin)}

Micromho answered 27/4, 2017 at 5:58 Comment(3)
Could you please elaborate more? What's the specified named Tasks and how to change it as exposed in the answer?Transpolar
I think the specified named tasks is a field in the Settings->Startup to. Change it to {Shells::cmd (Admin)}. At the moment my pc doesn't work anymore and I cant't look in my settings. I will get a new one, but I think I don't want to use ConEmu anymore. Sorry. If I have time I try to reproduce it.Micromho
downvoted the other answer because this actually works!Ghislainegholston
M
9

ConEmu does not change the command you run. That would be strange, if you run from Win+R the cmd.exe and get started in ConEmu powershell.exe, for example. Isn't it?

Same with elevation level. ConEmu starts console application at the level user requested. This is the only logical behavior.

Want elevated cmd? Set up elevated cmd task as startup task for ConEmu and run ConEmu instead of cmd.

Well, alternatively, you may run from Win+R cmd -new_console:a or just call "run cmd as Administrator" to let ConEmu know what do you want exactly.

Mixer answered 23/6, 2016 at 13:0 Comment(0)
E
6

To elaborate on @Mike answer above , In the Settings window go to Startup menu item in the left pane . Now , in the main window there is a Specified named task drop down , select the admin option you want - for me it's {cmd::Cmder as Admin} . Click Save settings and now Cmder will open as admin every time .

Ephedrine answered 23/4, 2019 at 13:21 Comment(2)
I think that this drop down does not exist anymore, or a screenshot would helpConsume
It does, you just have to click the Startup menu itself and not one of its submenus.Trahern
C
3

Right click on ConEmu (x64) icon. Select Properties > Compatibility Tab > Check Run this program as administrator

I have check it on windows 10.

Run this program as administrator

Catamite answered 9/9, 2020 at 4:18 Comment(1)
Thanks, it did the jobTorus
S
0

on win11, it worked for me to go into the settings in conEmu, startup>Tasks, select your previously created predefined task, i called mine Ubuntu::Bash, and the in the commands parameter box: %windir%\system32\bash.exe ~ -cur_console:p <<----this is what i had, i added another line with an asterisk. "*"

new commands parameter arguments: %windir%\system32\bash.exe ~ -cur_console:p CONEMU settings screengrab

*

worked great.

Sarto answered 13/2, 2022 at 11:2 Comment(1)
>> after looking at the way the site parsed my response, i think I should note, that the new commands parameter box should have two lines. One with whatever it had before, and another with just an asteriskSarto

© 2022 - 2024 — McMap. All rights reserved.