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.
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.
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.
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.