on Terminating non-DXLab applications via the Launcher


Dave AA6YQ
 

+ AA6YQ comments below

With 2.2.5 for launching what I use plus WSJT-x and JTA it works fine.
However terminating is not good. I get two different Launcher popups 11 times.
"No main window is specified for WSJTX" and "No main window is specified for startJTA".
Both WSJT-X and JTAlert start after DXLab apps, JTA using a bat file.
Will investigate more after the FT4 contest tomorrow.

+ If you have the Launcher configured to terminate an application using the Close method, you must specify the "Main Window Caption" for that application; if you do not, the Launcher will bring that to your attention each time it is directed to terminate that application.

+ Your options are

1. specify the "Main Window Caption" for that application, assuming it does not continuously change because, for example, it includes the current time of day

2. change the Termination method to None

3. change the Termination method to Kill; this is only appropriate if the application does not manage a database or other persistent data structure that might not be correctly updated if the application is terminate by this method

4. change the Termination method to ForceKill; this is only appropriate if the application does not manage a database or other persistent data structure that might not be correctly updated if the application is terminate by this method

+ There is a wide range of behaviors among Windows applications. There are three ways to determine how an application will react to the Close, Kill, and ForceKill termination methods:

A. Ask the application's developer. As with asking your QSO partner for his or her location, this is the most reliable.

B. Since the Close termination method directs Window to send a "close" message to the application, and since Windows applications should respond to a close message in the same way that they respond to clicking the X button in their Main window's upper-right corner, the result should be an orderly shutdown that preserves persistent data (e.g. in a database or text file). However, "should" does not mean "is guaranteed to"; there are almost certainly applications that do not conform to this assumption.

C. Review the application's source code, if it is publicly accessible

+ The Launcher was developed to enable users to manage all components of the DXLab Suite as if they are a single application; it makes installation, upgrades, starting, and terminating are all one-click operations. Termination always initiates an orderly shutdown, ensuring that there will be no loss of data in your Log, your Override List, or in the Spot Database.

+ Extending the Launcher to support the starting and terminating of non-DXLab application was done for your convenience. Previously, the Launcher did not enable you to start applications that required one or more command line arguments; your only recourse was to place the command line with arguments in a .bat file, and direct the Launcher to start that .bat file. Launcher 2.2.5 now correctly handles Command Lines with arguments, eliminating much of the need to use .bat files. This mitigates the fact that an application started with a .bat file cannot be terminated by any of the above methods.

+ Launcher version 1.3.3, released in April 2006, first provided the ability to terminate a non-DXLab application by directing windows to send it a Close message; this required users to specify the "Main Window Caption" for any non-DXLab applications to be closed in this manner. Because this approach doesn't work with applications whose "Main Window Captions" include constantly-changing information, I was asked to provide the option to terminate such applications using the Windows Taskkill command. Launcher 2.2.5 provides those additional options. Choose wisely; if you're uncomfortable with having to make a choice, set the Termination method to None.

73,

Dave, AA6YQ


Gilbert Baron W0MN
 

I am using WSJTX and radio controlled by COMMANDER. When commander terminates there is of course an error in WSJTX since3 there is no longer control of the radio. I just manually kill it after everything else is done. It does not cause a problem other than the need to do the extra manual operation.

Is there a proper way to have WSJTX terminated when I terminate everything that will avoid this error in WSJTX because of no longer having COMMANDER running or will I just have to live with this. If I terminate WSJTX first then there is an error in Commander because of loss of WSJTX.

Not a big deal but just wonder if there is a way to handle this combination of WSJTX and DXABS with commander controlling the radio without an extra manual operation on ignoring the resulting error from WSJTX asking if I want to reconfigure the radio.

Outlook LT Gil W0MN
Hierro Candente Batir de Repente
44.08226 N 92.51265 W EN34rb

-----Original Message-----
From: DXLab@groups.io <DXLab@groups.io> On Behalf Of Dave AA6YQ
Sent: Friday, March 31, 2023 2:48 PM
To: DXLab@groups.io
Subject: [DXLab] on Terminating non-DXLab applications via the Launcher

+ AA6YQ comments below

With 2.2.5 for launching what I use plus WSJT-x and JTA it works fine.
However terminating is not good. I get two different Launcher popups 11 times.
"No main window is specified for WSJTX" and "No main window is specified for startJTA".
Both WSJT-X and JTAlert start after DXLab apps, JTA using a bat file.
Will investigate more after the FT4 contest tomorrow.

+ If you have the Launcher configured to terminate an application using the Close method, you must specify the "Main Window Caption" for that application; if you do not, the Launcher will bring that to your attention each time it is directed to terminate that application.

+ Your options are

1. specify the "Main Window Caption" for that application, assuming it does not continuously change because, for example, it includes the current time of day

2. change the Termination method to None

3. change the Termination method to Kill; this is only appropriate if the application does not manage a database or other persistent data structure that might not be correctly updated if the application is terminate by this method

4. change the Termination method to ForceKill; this is only appropriate if the application does not manage a database or other persistent data structure that might not be correctly updated if the application is terminate by this method

+ There is a wide range of behaviors among Windows applications. There are three ways to determine how an application will react to the Close, Kill, and ForceKill termination methods:

A. Ask the application's developer. As with asking your QSO partner for his or her location, this is the most reliable.

B. Since the Close termination method directs Window to send a "close" message to the application, and since Windows applications should respond to a close message in the same way that they respond to clicking the X button in their Main window's upper-right corner, the result should be an orderly shutdown that preserves persistent data (e.g. in a database or text file). However, "should" does not mean "is guaranteed to"; there are almost certainly applications that do not conform to this assumption.

C. Review the application's source code, if it is publicly accessible

+ The Launcher was developed to enable users to manage all components of the DXLab Suite as if they are a single application; it makes installation, upgrades, starting, and terminating are all one-click operations. Termination always initiates an orderly shutdown, ensuring that there will be no loss of data in your Log, your Override List, or in the Spot Database.

+ Extending the Launcher to support the starting and terminating of non-DXLab application was done for your convenience. Previously, the Launcher did not enable you to start applications that required one or more command line arguments; your only recourse was to place the command line with arguments in a .bat file, and direct the Launcher to start that .bat file. Launcher 2.2.5 now correctly handles Command Lines with arguments, eliminating much of the need to use .bat files. This mitigates the fact that an application started with a .bat file cannot be terminated by any of the above methods.

+ Launcher version 1.3.3, released in April 2006, first provided the ability to terminate a non-DXLab application by directing windows to send it a Close message; this required users to specify the "Main Window Caption" for any non-DXLab applications to be closed in this manner. Because this approach doesn't work with applications whose "Main Window Captions" include constantly-changing information, I was asked to provide the option to terminate such applications using the Windows Taskkill command. Launcher 2.2.5 provides those additional options. Choose wisely; if you're uncomfortable with having to make a choice, set the Termination method to None.

73,

Dave, AA6YQ









--
W0MN EN34rb 44.08226 N 92.51265 W

Hierro candente, batir de repente

HP Laptop


Dave AA6YQ
 

+ AA6YQ comments below

I am using WSJTX and radio controlled by COMMANDER. When commander terminates there is of course an error in WSJTX since3 there is no longer control of the radio. I just manually kill it after everything else is done. It does not cause a problem other than the need to do the extra manual operation.

Is there a proper way to have WSJTX terminated when I terminate everything that will avoid this error in WSJTX because of no longer having COMMANDER running or will I just have to live with this. If I terminate WSJTX first then there is an error in Commander because of loss of WSJTX.

+ Configure the Launcher to start WSJT-X after your DXLab applications are started; this will prevent WSJT-X from reporting a "Rig control error" because it's running but Commander isn't. When you click the Terminate button on the Launcher's Main window, applications configured to start after your DXLab applications are started are terminated before your DXLab applications are terminated, preventing a "Rig control error" from WSJT-X when the Launcher terminates all enabled applications. See the "timing diagram" in

https://www.dxlabsuite.com/Launcher/Help/ControllingApplications.htm#Order_of_Application_Start-up_and_Termination

73,

Dave, AA6YQ