forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Having a VDS application as Windows Service

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Fri Nov 19, 2004 11:18 am    Post subject: Having a VDS application as Windows Service Reply with quote

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
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Nov 19, 2004 4:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Nov 19, 2004 6:23 pm    Post subject: Reply with quote

Raymond, below you can find an example CodeScript made with the help of the program Jules mentioned... Smile
http://forum.vdsworld.com/viewtopic.php?t=1942

_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Nov 19, 2004 6:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Fri Nov 19, 2004 7:55 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Sat Nov 20, 2004 12:04 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Tue Nov 23, 2004 2:14 pm    Post subject: Reply with quote

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
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group