Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating a Service App
Message
From
04/11/2018 01:44:58
 
 
To
All
General information
Forum:
WinDev
Category:
Coding, syntax and commands
Title:
Creating a Service App
Miscellaneous
Thread ID:
01663131
Message ID:
01663131
Views:
65
Hi All

I posted a question about developing a service app in VFP9 a short while ago and then discovered there was service app functionality in WinDev and decided to use that instead. For those who might have an interest I thought I would give some feedback on that here. It is really simplicity itself:

1) Create a new WinDev application of type "Service". This app must have no user-interface but otherwise can do anything like a normal desktop app such as access data files, read/write disk files, internet/network connections/access, etc. Anything.

2) Create another WinDev application of type "Desktop" application (optional). This app is your control app. Create a form, add some buttons for;

a) installing the service,
b) starting the service,
c) pausing the service,
d) stopping the service, and
e) uninstalling the service.

These functions are all built in and basically a single function call. e.g. to install a service you just use ServiceInstall( sService_Name ), to start it you just call ServiceStart( sService_Name ), etc. "ServiceName" is the name you gave your service. Not all buttons are required, it depends on what you want your control app to do. You might not even want a control app at all and instead just install the service and use Windows Service Administration to manage it. I made a control app so the user could handle the service all in one place including monitor it, see if it is running , stopped, etc.

3) The service app will automatically run under System account unless you tell it to use another account (via your control app - start service button)

4) The control app needs to run with Admin privileges in order to install it, start it, stop it, etc. This is automatically so when logged in as Administrator on a Windows server o/s and you can use UAC to elevate to admin privileges under desktop Windows.

5) Lastly, although not tested, you can also do all this for Linux too i.e. create both desktop app and Linux daemon (service).

I was surprised how simple this was.

.
In the End, we will remember not the words of our enemies, but the silence of our friends - Martin Luther King, Jr.
Next
Reply
Map
View

Click here to load this message in the networking platform