Running OL2K as a service



Can Outlook be set to run as a service on W2K Pro clients? If not, is
there a way to disable the exit functions? I'm trying to prevent
Outlook from being closed and would prefer to handle this within
Outlook as opposed to 3rd party software.

Bill Richardson




Well, maybe I'm one of the next MVP's :).

By using Srvany.exe one can install standard applications as services. The
Srvany acts as a wrapper around the standard application and handles the
service events like starting and stopping. One uses the Instsrv.exe to
register the Srvany with a service name, and then uses the registry to
attach the application which should be started through Srvany.

Instsrv.exe MyService C:\Srvany.exe

[HKEY_LOCAL_MACHINE \SYSTEM \CurrentControlSet \Services \MyService

Application = "C:\MyApp.exe"

Note one can control the new service from the command line using SC.EXE or

More Info MS KB Q137890

More Info MS KB Q166819

More Info MS KB Q251192



Ken Slovak - [MVP - Outlook]

No matter what the hack Outlook is not suitable for running as a
service. It produces modal dialogs that will hang Outlook when run as
a service and its threading model is completely unsuited for it.

Instead you can use CDO 1.21 or Extended MAPI code on the server and
run that in a service. Just don't run Outlook that way.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question