Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"-single" ignored when calling a defined task from registered "ConEmu Here" #1046

garu57 opened this issue Feb 17, 2017 · 7 comments


Copy link

garu57 commented Feb 17, 2017


ConEmu build: 161206 [64]
OS version: Windows 7 6.1.7601.x64, Product: 1, SP: 1.0 x64
Used shell: cmd

Problem description

While -icon specified in "Startup/Tasks/Task parameters" is honored, -single is ignored when calling task from registered "ConEmu Here" context menu entry.

Steps to reproduce

  1. enter -single and -icon in "Startup/Tasks/Task parameters" of a console task
  2. register a "ConEmu Here" context menu entry using that task
  3. invoke the console task from the context menu

Actual results

While the console tab icon is indeed what you specified with the -icon option, each time the menu is clicked a new ConEmu window is opened.

Expected results

I' expect that like -icon also -single is honored if specified in "Startup/Tasks/Task parameters" when calling the task from a registered "ConEmu Here" context menu item


Copy link

ghost commented Feb 17, 2017

try updating task bar

Copy link

garu57 commented Feb 17, 2017

I'm not sure to understand what you mean.
I'm talking about calling a console from explorer directory context menu and it should have no relation to the task bar.
I registered the menu item like this:

[HKEY_CLASSES_ROOT\Directory\shell\ConEmu Here]

[HKEY_CLASSES_ROOT\Directory\shell\ConEmu Here\command]
@="\"C:\\local\\Tools\\conemu\\ConEmu64.exe\" -dir \"%1\" -run {cmd here} -cur_console:n"

And here it is the related task:

<key name="Task11" modified="2017-02-17 10:05:28" build="161206">
    <value name="Name" type="string" data="{Shells::cmd here}"/>
    <value name="Flags" type="dword" data="00000004"/>
    <value name="Hotkey" type="dword" data="00000000"/>
    <value name="GuiArgs" type="string" data="-single -icon powershell.exe"/>
    <value name="Cmd1" type="string" data="cmd.exe /k &quot;%ConEmuBaseDir%\CmdInit.cmd&quot;"/>
    <value name="Active" type="long" data="0"/>
    <value name="Count" type="long" data="1"/>

The -icon is accepted, that is i obtain cmd.exe consoles with their default icon overlaid with powershell icon, but -single is ignored, already opened ConEmu windows are never reused and for each new console it is opened a new window.

Copy link

ghost commented Feb 17, 2017

Had to fiddle with it for a while to figure out what was going on. I got it to work but I may have a different version but worth a shot

Settings > Integration >> ComSpec > At the bottom, register the reg setting with Force new ConEmu window unchecked > Dont forget to hit Register Button then Save Settings Button.

Then I closed all ConEmu windows/processes

Then opened a fresh conemu session and back into: Settings > Integration > ConEmu Here > Command: change it to /single -run {cmd} -cur_console:n. and make sure to hit the Register Button before hitting Save settings Button.

Then I closed all ConEmu windows processes again and went back into the settings to see if it kept my settings. Because it kept adding /nosingle even though I took it away, I think because I had the "Force" check box checked on step 1.

Also dunno if this will help, it mentioned you could use -reuse -run if you hover over the command text box for conemu here in a bubble tooltip, but I didnt need to do that in the end

Copy link

ghost commented Feb 17, 2017

if it helps, my {cmd} = default shell, taskbar jump lists, /icon "C:\Windows\System32\cmd.exe" /single, cmd.exe /k "%ConEmuBaseDir%\CmdInit.cmd"

Copy link

garu57 commented Feb 20, 2017

Many thanks for your efforts in trying to help me.
I was aware that putting -single (or /single) in the registered command of "ConEmu Here" works as intended, that's the solution i had to resort to. But i want to be able to alter the behavior of the console from ConEmu settings without having to fiddle with registry again.

So the question i have is, why do i have to to put -single in the registered command, while instructions say the right place to put it is "Startup/Tasks/Task parameters"? Why only -single is ignored from there while for instance -icon is honored?
Is that an intended behavior or is it a bug?
Thank you.

Copy link

There is also -reuse switch.

@Maximus5 Maximus5 added this to To Do in Inspection via automation Apr 17, 2018
Copy link

Perhaps there were different AppID in started ConEmu windows.

Maximus5 added a commit that referenced this issue Apr 17, 2018
…ion if it's a default xml.

  Probably related: gh-1046


  If configuration file was set by argument `-LoadCfgFile "%ConEmuDir%\ConEmu.xml"`
  and it is *already* the default settings location (the same without `-LoadCfgFile` switch),
  than xml path is not used in AppID generation.

  Note: AppID is utilized during search for appropriate ConEmu instance
  when `-single` or `-reuse` switch were specified.
Inspection automation moved this from To Do to Done Apr 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

No branches or pull requests

2 participants