in

This Blog

Syndication

Advertising

mystyleit

Running Mecury Mail as a Service

Running Mecury Mail as a Service

Mercury mail is a great, free mail server that can be used for dozens of things. Unfortunately the free version does not run as a a service.

This post will explain how to run the free version of Mercury Mail as a service. This procedure could be extended to run other processes as services as well.

Creating a Customer Service

Review the following KB article:
http://support.microsoft.com/kb/137890

In short, you can use Instrsrv.exe to create your own services and srvany.exe to start executables. Instrsrv.exe and srvany.exe are included in the Windows Server 2003 Resource Kit Tools which can be downloaded here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=9D467A69-57FF-4AE7-96EE-B18C4790CFFD&displaylang=en

Both instsrv.exe and srvany.exe have worked for me on x64 Server 2008

Creating the Mercury Mail Service

Create a folder called service in your MERCURY installation folder. Copy instsrv.exe and srvany.exe. Create to batch scripts, call one service.bat and the other remove.bat. You should have something that looks like this:

Add the following to service.bat (this batch file will create the service)

Add the following to remove.bat (this batch file remove/uninstall the service)

Next run service.bat. This will create the service entry.

The final step is to setup the registry for srvany.exe. Create the following keys and values:

Finally start up the service.

Be careful not to start Mercury in the native app mode while the service is running, or you might make it angry. The best way to do it is to stop the service, launch Mercury, make your configuration changes, close Mercury, restart the service.

Conclusion

Hope you found this information useful!

Published Jun 15 2009, 02:24 PM by mike.clarke
Filed under:

Comments

 

Walter said:

Thank you that worked.

December 25, 2010 4:39 PM

Leave a Comment

(required)  
(optional)
(required)  
Add

About mike.clarke

Mike is currently a Systems Specialist for a major Canadian software developer and the founder of mystyleit.com.