General discussion

Locked

VB program running as a Service.

By ablokh ·
I have a VB program that copies some files from one server to another, also accessing an FTP site.
I have a Form which contains Timer, Inet, Winsock and SMTP controls.
I set it up to run as a Service using SRVANY.EXE .
You can start the service manually OK, but it does not start automatically at the server startup, even though it is set up to start automatically.
Is it because it has a Form?
Or what is the problem?
Thanks.
Alex.

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

VB program running as a Service.

by Glen_McLeod In reply to VB program running as a S ...

2 things to consider:

Yes, the form can stop this from working as a service. There really shouldn't be ANY user interface elements to things that you want to run as a scheduled service. You can code directly to the interfaces (references) instead of the controls that require a form.

Under your project's properties, there's a check box for 'unattended execution'. Check it.

Glen

Collapse -

VB program running as a Service.

by Glen_McLeod In reply to VB program running as a S ...

You have to use ActiveX .exe or .dll as your project type to get that option.

Glen

Collapse -

VB program running as a Service.

by ablokh In reply to VB program running as a S ...

Glen, thanks for the answer.
One point: unattended execution box is disabled in the project properties.
I tried to delete the Form from the project, shanging startup object to Sub Main in my Standard .EXE project, but the result is the same.
Whatcauses the check box to be disabled?

Back to Software Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums