# Starting and stopping Windows services

**URL:** <https://forum.xojo.com/t/starting-and-stopping-windows-services/21851>\
**Category:** Web\
**Created:** [January 26, 2015, 4:13am UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851 "2015-01-26T04:13:18Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dean\_Davidge](https://forum.xojo.com/user_avatar/forum.xojo.com/dean_davidge/32/244_2.png) [@Dean\_Davidge](https://forum.xojo.com/u/Dean_Davidge)\
**Post date:** [January 26, 2015, 4:13am UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/1 "2015-01-26T04:13:18Z")

</div>

The release notes for 2014r3 contains

> [@](#):
>
> 29283 Web: Exposed Windows Service events Pause, Resume and Stop in WebApplication.

I can’t find anything in the LR about how to use this. How can I use this feature?

---

<div class="post-metadata">

**Author:** ![Tim\_Hare](https://forum.xojo.com/user_avatar/forum.xojo.com/tim_hare/32/176_2.png) [@Tim\_Hare](https://forum.xojo.com/u/Tim_Hare)\
**Post date:** [January 26, 2015, 4:21am UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/2 "2015-01-26T04:21:32Z")

</div>

You put code in those events to do something when your app is acted on by the outside and told to pause, resume or stop. Not sure if it only applies to standalone apps that you’ve set up as a service, or if it applies to cgi apps, too.

---

<div class="post-metadata">

**Author:** ![Wayne\_Golding](https://forum.xojo.com/user_avatar/forum.xojo.com/wayne_golding/32/165_2.png) [@Wayne\_Golding](https://forum.xojo.com/u/Wayne_Golding)\
**Post date:** [January 26, 2015, 6:33am UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/3 "2015-01-26T06:33:02Z")

</div>

As Tim says these are to allow your app to respond to events from the windows service manager. To actually initiate these you’d use the SC command (shell) or services.msc.

The usefulness of Pause & Resume mystifies me as I don’t see any way of stopping or starting a web service from listening to connections.

---

<div class="post-metadata">

**Author:** ![David\_Cox](https://forum.xojo.com/user_avatar/forum.xojo.com/david_cox/32/227_2.png) [@David\_Cox](https://forum.xojo.com/u/David_Cox)\
**Post date:** [January 26, 2015, 10:38am UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/4 "2015-01-26T10:38:50Z")

</div>

Note that even though you can create, pause or delete a Windows service from the shell, I have had trouble getting a brand new Windows Service to start the first time  you need to start it manually (via Task Manager \> Services) or reboot to start it. Once created you can pause and restart the service. I think this is a Windows limitation.

---

<div class="post-metadata">

**Author:** ![Maurizio\_Rossi](https://forum.xojo.com/letter_avatar_proxy/v4/letter/m/ba8739/32.png) [@Maurizio\_Rossi](https://forum.xojo.com/u/Maurizio_Rossi)\
**Post date:** [January 26, 2015, 11:24am UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/5 "2015-01-26T11:24:56Z")

</div>

Hi David,  
in the Windows Functionalty Suite (WFS) there are functions to create, start, stop and delete services programatically.  
I use these functions with no troubles.

---

<div class="post-metadata">

**Author:** ![David\_Cox](https://forum.xojo.com/user_avatar/forum.xojo.com/david_cox/32/227_2.png) [@David\_Cox](https://forum.xojo.com/u/David_Cox)\
**Post date:** [January 26, 2015, 12:39pm UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/6 "2015-01-26T12:39:45Z")

</div>

@Maurizio Rossi Thank you, I didn’t realise that.

---

<div class="post-metadata">

**Author:** ![Frederick\_Roller](https://forum.xojo.com/user_avatar/forum.xojo.com/frederick_roller/32/479_2.png) [@Frederick\_Roller](https://forum.xojo.com/u/Frederick_Roller)\
**Post date:** [January 26, 2015, 1:41pm UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/7 "2015-01-26T13:41:01Z")

</div>

> [@162231:@Wayne Golding](#):
>
> The usefulness of Pause & Resume mystifies me as I don’t see any way of stopping or starting a web service from listening to connections.

Those events are useful because the connections can be directed to a blank page and their sessions issued a Quit, background Threads can be stopped, etc. but those events would be much more useful if we had a means of ignoring connection attempts in Web apps. Perhaps a feature request is due. 😉

---

<div class="post-metadata">

**Author:** ![Frederick\_Roller](https://forum.xojo.com/user_avatar/forum.xojo.com/frederick_roller/32/479_2.png) [@Frederick\_Roller](https://forum.xojo.com/u/Frederick_Roller)\
**Post date:** [January 26, 2015, 3:36pm UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/8 "2015-01-26T15:36:28Z")

</div>

\<[https://xojo.com/issue/37892](https://xojo.com/issue/37892)\> WebApplication - Pause/Resume Accepting Connections

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:35pm UTC](https://forum.xojo.com/t/starting-and-stopping-windows-services/21851/9 "2020-10-29T17:35:52Z")

</div>


