Tie .exe file into a service

Hi Experts. We have an in-home app that allows certain messages to be sent to various users. If this app (message.exe) isn't running, then the messages aren't sent out. I didn't create or design this app, I just have to find a way to get the exe to run on the server if no one is logged into it. Right now, if no one is logged into the server, then the exe won't run.

I am open to ideas on how to get the app to run with no one logged in. The server is Windows 2003 and is apart of an AD environment. Thanks for your help.

There are two main ways you could make this happen:
1) As your title suggests, create a service from the .exe. Here are a couple articles that should help out with that:
http://support.microsoft.com/kb/137890

2) Create a scheduled task and assign credentials for it to run under.

If it is something that should run at specified times (e.g. once an hour/day/week/etc.) then scheduled task might be the better choice. If it is something that you want to have run continuously, or in response to an event, (e.g. emailing whenever a log file reaches 'x' size) then you probably want to do a service.

Here is what I understand, please correct me if I am wrong.
1. Copy my service.exe into the %systemroot%\system32 folder
2. Using SC, I will run:
sc create myservice binpath= c:\windows\system32\service.exe

It is a service that should run all the time, no schedules or event related.

Barring the unexpected service hang which can happen with anything, yes that's about it, generically speaking.

Depending on what it is meant to do, the .exe may need something to poll for information to notice a change, unless something is submitted directly to it. That gets into a different realm of expertise and has to deal with how the exe itself runs, not simply making it a service so that if it is designed properly it can act that way automatically. If it doesn't need to poll, refresh, etc. then yes, this would be it.

Not really sure... instead of using the sc method, you could try removing it and trying the other way from the first link. Here is another article that has some screenshots of that method.http://www.tacktech.com/display.cfm?ttid=197

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Sorry, I hadn't gotten to checking up on this one yet today - looks like you got it worked out. Nice summary documentation at the end - I wish I could give you points back just for that! I'm happy to see that everything is working for you!

I didn't get a notice you had posted back! Thanks again for your help on this. I would have labeled it "impossible" and not worked on it again had you not offered your time and help. I appreciate the kind words regarding the documentation.

0

Featured Post

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…