Batch Mode Displaying Icon In Taskbar

Posted by Roger Blanchard on 12-Jan-2018 06:44

When using the -b startup parameter should an OE icon be displayed in the taskbar? This module has no UI and is used for replication. If I put my mouse over the icon you can see a grey progress window.

I am using the following;

prowin32.exe -b -pf -ininame ospreypos.ini -p StartSyncManager.r -errorstack

prowin.exe -b -pf -ininame ospreypos.ini -p StartSyncManager.r -errorstack

prowc.exe -b -pf -ininame ospreypos.ini -p StartSyncManager.r -errorstack

If I remove the -b I do not see the icon in the taskbar.

prowin32.exe -pf -ininame ospreypos.ini -p StartSyncManager.r -errorstack

All Replies

Posted by Matt Gilarde on 12-Jan-2018 06:54

A default window is created in batch mode and its icon is displayed on the taskbar. This goes way back, but I think the idea was that the icon gave you an easy way to close a hung batch process. I'm not sure that makes sense since the Task Manager is easy too and there's a danger of users killing batch processes because they see the icon and don't know what it is.

Posted by Roger Blanchard on 12-Jan-2018 06:58

Thanks for the info. I guess we will not use the -b does not look good. I never used this before but would have expected batch-mode to show no UI window/form/icon.

Posted by Matt Baker on 12-Jan-2018 07:05

It sounds like what you are trying to achieve is the behavior of a daemon process.  This would be an "invisible" (at least to the task bar) process that runs in the background.

PDSOE does this by running a regular prowin in the background.  You just have to be very careful about not creating any UI that would cause a window to be displayed.  this means making sure all display  and message statements are removed and sent to a log file instead.

The upside of using -b is that the AVM will allow you to redirect standard out, but the trade off is the icon in the task bar.

Posted by Roger Blanchard on 12-Jan-2018 07:11

Yes, that is what we are doing. It is a DB sync manager that is replicating tables from the server to a local SQLite DB that will be used by a point of sale terminal. We are using a NotifyIcon to display an icon of a database in different states (idle, fetching, error, etc.).

There are no message statements and all errors are caught and logged.

Thanks for the info.

Posted by Matt Gilarde on 12-Jan-2018 07:13

Matt's comment reminded me - you can use _progres.exe instead of prowin/prowin32 in most cases. _progres.exe doesn't create the default window.

This thread is closed