Page 1 of 1

Autostop on Control exit (just like Autostart when entering)

PostPosted: 31. October 2022 08:26
by lwc
The Control's Config button allows to set services for autostart.
But in order to stop services, one has to:
[list=]
[*]Manually stop each and every service.
[*]Only then click Quit inside the Control.
[/list]
Is there a way to just make the Control autostop all services upon clicking Quit? Unusually that's what one expects upon quitting.

Thanks!

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 31. October 2022 15:59
by Froosh
The Control Panel does not actually auto start the Windows Services. All the Control Panel does is configure the Windows Services to auto start. Windows does the rest.

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 11. November 2022 20:52
by lwc
If I can click manually on stop for each and every item, like Apache, why can't it just click it for me for all of them?

Speaking of the example of Apache, does auto start not just launch apache_start.bat which runs apache\bin\httpd.exe?
If so, when I click stop it just runs apache_stop.bat - if so, why can't it auto run apache_stop.bat for me when I close the control panel?

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 12. November 2022 15:16
by Froosh
I suppose the developers of XAMPP could do that, but I do not think that is appropriate when you have configured components used by XAMPP to run as Windows Services.

As Services, they start automatically, regardless of if the XAMPP Control Panel is even loaded. Applications, or in this case Services that make up XAMPP, are really a collection of independent packages configured by XAMPP, but not specifically XAMPP software.

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 19. November 2022 22:50
by lwc
In that case, hoe come there's an Autostart option? What does it do if those services already run anyway?

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 21. November 2022 16:01
by Froosh
There is only an option to configure a component to run as a Windows Service. XAMPP's Control Panel itself does nothing more with its components configured as Windows Services.

When the Service checkbox is checked, it indicates that the component is set to run as a Windows Service. When initially checked, XAMPP establishes or adds the Windows Service entry, and configures it to autostart on Windows startup, and stop on Windows shutdown.

Personally, I would be bothered if upon closing the XAMPP Control Panel, the Services were stopped. It would be unexpected behavior, and I know of no application that uses Windows Services that behaves that way. Perhaps there are some, but I do not know of them.

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 21. November 2022 17:15
by Altrea
actually there are two ways.

The first one is by registering Windows services, they work independendly from the control panel.
The second one is in the settings to start single components with start of the control panel component

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 22. November 2022 20:13
by lwc
Altrea wrote:actually there are two ways.
The second one is in the settings to start single components with start of the control panel component

Exactly! So can you apply the same logic to auto stop all those single components?

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 22. November 2022 21:42
by Altrea
No, it is not implemented in the control panel.

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 26. November 2022 15:57
by lwc
Altrea wrote:No, it is not implemented in the control panel.

Will you consider it then? It will just complete Autostart.

Re: Autostop on Control exit (just like Autostart when enter

PostPosted: 26. November 2022 16:20
by Altrea
I do not code the xampp control panel, no.
But every xampp installation ships with the source files.
so if you have experience in Delphi programming feel free to add this feature yourself and share it with the community on the Apachefriends Github.