I need to create an application that will run on a workstation, similar to a service. The program will be launched at startup and needs to shut down automatically when the user logs off.
The program is windowless, and will not do anything unless a flag (file) is present on the network.
Here is what I was thinking:
This works fine, and does not eat up the processor.
THE PROBLEM IS:
When I log off, Task Manager does not shut this application down. I would like this application to run more like a service. I have not been able to find any info on this subject. Any ideas?
Thanks!
The program is windowless, and will not do anything unless a flag (file) is present on the network.
Here is what I was thinking:
Code:
...
App.TaskVisible = False
...
Do While Dir("\\Network\SomeDir\User.txt") = ""
Sleep 15000 'Check for flag every 15 seconds
Loop
...
'Do stuff,delete the file, and restart the process
This works fine, and does not eat up the processor.
THE PROBLEM IS:
When I log off, Task Manager does not shut this application down. I would like this application to run more like a service. I have not been able to find any info on this subject. Any ideas?
Thanks!