Link to home
Start Free TrialLog in
Avatar of CodeHead
CodeHead

asked on

VB as a Service

Hey,
I need to write a program that will clean files out of a directory every hour.  I am looking for an example of how to do this.
Avatar of TimCottee
TimCottee
Flag of United Kingdom of Great Britain and Northern Ireland image

Write your application in vb, using the DIR and KILL functions (or whatever you want to find the files and clear them). Then compile it and using the SC.EXE tool from the NT Reskit, register it as a service. That is all there is to it.
Avatar of CodeHead
CodeHead

ASKER

Where can I get the NT ResKit?
You can use srvany.exe, which comes with NT Reskit, the Resource Kit also comes with documentation on how to register an application as a service using Srvany.  If you have access to an NT Server, the Resource Kit is usually on the system drive.
ASKER CERTIFIED SOLUTION
Avatar of Éric Moreau
Éric Moreau
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Best off with emoreaus first suggestion... I've used it and it comes in damned handy when makin services... also adds to the system log and reads and writes  to the registry for u.