![]() |
||||
![]() |
Running Mercury as a NT service
Mercury? NT service?
Mercury is a freeware POP3/SMTP Email server. The utility of an email server is only realized when it is available
all the time. This is a problem in laboratories and businesses using Windows NT, since different users are logging in and out all the time.
Fortunately, Mercury and other applications can be run as an NT "service," which basically means that the operating system can run it in the
background all of the time so that it starts automatically and otherwise stays out of the way. The entire process is (ideally) invisible to the
individual users.
The problem is, since Mercury was not designed as a NT service, you have to trick NT into running it as one using
the application SRVANY (provided by Microsoft). While
this isn't too hard, I've found that nearly all of the tutorials available on the web have one or more mistakes that will prevent their
combinations of instructions from working. After hashing it out for myself, I've attempted to spell out specifically how to make Mercury work
as a service. Go get SVRANY and INSTSRV
You will need two applications from the NT Resource Kit - SRVANY and INSTSRV. You can download the entire NT3.5 Resource Kit from Microsoft here. You may also want the updated NT4 version of SRVANY, which you can download
here (ftp.microsoft.com/bussys/winnt/winnt-public/reskit/nt40/i386/srvany_x86.exe). I honestly don't know if there is any important difference between the two versions of SRVANY. You will also find these files in various non-Microsoft locations of questionable legality. Install and/or unpack the files as necessary, and make sure SRVANY and INSTSRV are in easily accessible locations. I put mine in c:\srvany. Install a service
Make note of the exact path to Mercury. I put mine in c:\mercury. Open up a command prompt (the little MSDOS icon in Start/Programs), and go to the directory where you stored SRVANY and INSTSRV. Now you need to tell NT to install SRVANY as a new service, but with a name that "makes sense," like "mercury." Issue the command: instsrv mercury c:\\srvany\\srvany.exe There are three things to note here.
You should now have a screen telling you that the service has been successfully added. If you wanted to delete this entry and make changes, just enter: instsrv mercury REMOVE Check the services settings
Pull up the control panels, and start "Services." Scroll down and you should find your new service "mercury," or whatever you named it. Select mercury, and press the "Startup..." button on the right. Make sure that (1) startup is automatic, (2) Log On as is set to System Account, and (3) Allow Service to Interact with Desktop is unchecked. Click Ok. Edit the registry
Be careful doing this! Editing your registry is as close to major surgery that you can do on your operating system. If you aren't certain about a step, stop and ask your sysadmin what to do. Pull up the Start/Run... dialog box, and start regedit. You should see a window with a bunch of "folders" on the left hand side. This works just like Explorer. Double-click on a folder and it expands. Open up folders through the following path: HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services/mercury As before, the "mercury" part may be different in your case, depending on the name you gave the service. You will see all sorts of entries, including one called "ImagePath," which should now be pointing to SRVANY (double-/s and all). You need to make two additions to this folder.
That should be it! Close up the registry editor. There is no "save" command. Test it / Pitfalls
Restart the computer. Watch for any "Dr. Watson" complaints about SRVANY failing, and make note of the error number. If there are no errors, return to the Control Panels/Services box, and scroll down to mercury. If all went well, the Status should read Started.
If Mercury did NOT start, I found the most likely problems to be:
|
|||
|
|
||||
![]() |