| View previous topic :: View next topic |
| Author |
Message |
Raymond175 Contributor


Joined: 24 Apr 2002 Posts: 72
|
Posted: Fri Nov 19, 2004 11:18 am Post subject: Having a VDS application as Windows Service |
|
|
Hello,
I've just created a database file uploader program. A little application that uploads certain files in specified paths to a database. This is for opening them though the Intranet.
Now this program runs on the server in out company, a Windows 2000 Server. I want to run my little application as a Windows System Service, but when I install my program as a service, it is listed in the list, and it sometimes starts also, but it always gives an error: It cannot start the program because the start and stop procedures are missing or something (I can't remember exactly).
Does anyone know how I can get this program as a Windows Service?
Thanks in advance,
Raymond |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Fri Nov 19, 2004 4:55 pm Post subject: |
|
|
What I have done for my VDS apps that I want to run as a service is use a free program called XYNTService. It runs as a service, and then ensures that your VDS app(s) are running.
VDS apps themselves can't be services by themselves because services have to export various functions that Windows needs to control them. I unfortunaltely can't say more, but it's possible that VDS 6 will be able to create executables based on a variety of different stubs, and strangely enough, I happen to have developed a stub that runs as a service... _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Fri Nov 19, 2004 6:42 pm Post subject: |
|
|
If that seems complicated, then actually I found that I could do everything using the program, without any of Codescript's API stuff! _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Nov 19, 2004 7:55 pm Post subject: |
|
|
I recall that VDS EXE's don't work as a Windows service if they have a
dialog. As long as you don't show a dialog box on the service executable
then you should be fine. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sat Nov 20, 2004 12:04 pm Post subject: |
|
|
You can have a window that is not show, which is sometimes useful. Actually, you can show a dialog, but it hangs the service if there isn't a desktop on the screen at the time. I found that I could test for a desktop by looking for the window class #ProgMan. _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
CodeScript Moderator Team

Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Tue Nov 23, 2004 2:14 pm Post subject: |
|
|
If U desperately need a dialog then prolly API is the only way - so that U can destroy the dialog without quitiing the application.
Ofcourse this is complicated for most users and doesn't allow use of VDS elements though one can use elements from extensions. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
| Back to top |
|
 |
|