Need help activating SysTray apps

Started by snowsnowsnow, February 09, 2018, 09:36:50 AM

Previous topic - Next topic

snowsnowsnow

Background: On some of my Windows machines, I do not run "EXPLORER.EXE" as my desktop shell.  This is for a variety of personal reasons which do not concern us in this thread.

Usually, I either use a shell of my own creation (written in WinBatch, of course) or just use CMD.EXE.  This  is installed in the system via the usual registry hack.

The problem: This works just fine in every way and I'm quite happy with it, except (of course) for one little thing.  That is, some applications install themselves in such a way that the only way to interact with them is via the systray.  That is, in order to do anything with them, you have to right click on their little icon in the systray, and select the option to "Show" the window.  Once the window is "shown", then you can interact with it normally.  Since the shells that I use do not have a systray, I cannot bring up these windows.

What I am looking for: I'm 98% sure that there is some kind of Windows API that one can use to access the systray area, and that it can be done in WB using DllCalls()s and the like.  That is, a way to get to it other than physically mouse-clicking in the area.  I'm sure someone here knows how to do this...  As noted, I am looking for a solution in WB.

Side note: Once, long, long ago, I solved this problem by running the ReactOS shell (an EXPLORER clone) as a process on my desktop - this actually worked, because it came up as a window on the desktop, complete with a systray, and you could use that to get your systray app visible.  Pretty neat, but obviously a kludge.  But it does show that it is possible for a user process to do the needed thing.

Unfortunately, that version of ReactOS is no longer available, and I have no way to retrieve the version I had so long ago.  Shame, that...

kdmoyers

Quote from: snowsnowsnow on February 09, 2018, 09:36:50 AMI either use a shell of my own creation (written in WinBatch, of course)
Woof! that's hard core -- awesome!
The mind is everything; What you think, you become.

snowsnowsnow

Well, lots of responses here.  Strange, because I'm sure the answer is out there and that there are at least some people who frequent this board who would know.  Oh, never mind that.  Sometimes it works, sometimes it doesn't.

But, anyway, the good news is that I was able to find an old copy of ros-explorer (from 2007 (!)) and that did solve my problem.  Running ros-explorer allowed me to bring up the systray'd program (after which I was able to easily shut ros-explorer down).

So, problem solved - at least for the time being.  Would be nice to have a more compact, API-based, solution.

td

The only documented API that I am aware of that can be used to create a 'bar' window on the Windows desktop is "SHAppBarMessage".  It is exposed by shell32.dll which is part of the Explorer shell.  The documentation can be found here:

https://msdn.microsoft.com/en-us/library/windows/desktop/bb762108(v=vs.85).aspx

There is an example of using the function in the Tech Database but the example's purpose is simply to set the auto-hide feature of the system taskbar:

http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/nftechsupt.web+WinBatch/How~To+Autohide~Taskbar~Code.txt

I have no idea if it can be used to create an app bar that provides the functionality you want when the Explorer shell is not running.
"No one who sees a peregrine falcon fly can ever forget the beauty and thrill of that flight."
  - Dr. Tom Cade

snowsnowsnow

OK.  Thanks.

I'll take a look at that.