Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Anybody who is writing a script intended to run as a service needs to consider what tasks the script will perform and then determine if any of those tasks involve interaction that cannot be eliminated. If any interaction is involved, then the script cannot run as a service, no "ifs", "ands" or "buts" about it.
Although it may seem more complex, the proper solution to the interactivity part is to split the service into 2 pieces. There's the service itself that runs as long as the system remains booted, and then there's an "agent" application that runs in the user's interactive session via the "Startup" folder or via the "Run" registry key or via a logon script. The "agent" can perform interactive tasks, and then it can communicate with the service via a TCP stream or a named pipe or some other IPC mechanism. This is what Microsoft is recommending and it is a very workable and technically sound method to use.
Article ID: W17262
File Created: 2007:07:03:14:29:04
Last Updated: 2007:07:03:14:29:04