0

Using a shortcut I am able to set an icon for a batch program and pin it to the taskbar. However, when I click the icon and the program opens it does not show the shortcut icon as running, it instead groups it with Command Prompt.

See screenshot below. The soccer ball is the icon for the batch file. But when it is clicked the Command Prompt icon shows up (not pinned) and has the underline as a currently running program. Clicking the soccer ball again tries to open the program a 2nd time rather than switching to the currently running program.

enter image description here

How can I get the pinned program to display and function as the currently running program when it is clicked?

2
  • Windows 10 or 11?
    – harrymc
    Commented Apr 10, 2023 at 20:08
  • @harrymc Windows 11
    – jchavannes
    Commented Apr 10, 2023 at 22:50

2 Answers 2

0

If you convert the batch file to a Windows executable (.exe) file, you would then be able to set the icon for the executable with a resource editor such as Resource Hacker.

3
  • Also know, this isn't actually "converting" batch to exe. Only a simple exe wrapper that will run your batch for you without the need to invoke cmd.exe on your own but it should solve your dilemma. Commented Apr 11, 2023 at 0:50
  • The batch file is just calling an exe. Switching the shortcut to calling the exe directly, without a batch file, still has the same issue.
    – jchavannes
    Commented Apr 11, 2023 at 5:02
  • Tried create an EXE from the BAT file using the method in the linked answer and it did not work. However, the original linked Github script did work [1]. But it still has the same issue of grouping the program with Command Prompt. [1] raw.githubusercontent.com/npocmaka/batch.scripts/master/hybrids/…
    – jchavannes
    Commented Apr 11, 2023 at 5:20
0

The .bat script is executed by CMD, so the Windows 11 taskbar groups both together in one icon group.

The Windows 11 taskbar doesn't support the option of “Never Combine” taskbar icons which was found in Windows 10, so doesn't offer any solution except that of executing the script using another handler, for example PowerShell.

Another solution is to replace the Windows taskbar by a third-party taskbar product in order to regain this option as in Windows 10. These products emulate an evolved version of the Windows 7 taskbar.

If one can believe the article Windows 11’s “Never Combine” taskbar icons feature is coming in the fall, dating from March 16, 2023, this will change in an upcoming upgrade.

The article says:

According to sources familiar with the development, Microsoft is finally working on returning the ability to ungroup taskbar icons/items or buttons. The feature is called the “never combine” Taskbar, which was first added to the OS with Windows 7.

With this feature, you can restore the classic Windows 10 behaviour where the same app won’t be grouped under one icon.

The feature is coming in the fall, and Microsoft is also restoring the ability to show app titles, which was removed with Windows 11 21H2. The never combine option is present in the public builds, but it doesn’t work now, and codes to make the feature work are missing.

For the moment, your options are either to wait for the next release which might possibly be named 23H2, or use a third-party taskbar in the meantime.

1
  • Thanks for the info. I like that programs are grouped and do not want to disable that. Though I want them to be grouped correctly. It's odd to me that the shortcut icon correctly opens the program but that it doesn't associate the open program with the icon. Also I don't want a 3rd party taskbar. Seems like this is unsolvable issue. Appreciate your input.
    – jchavannes
    Commented Apr 11, 2023 at 16:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .