Run Windows application as a service?

windows, windows-server-2003, windows-server-2008, windows-services

Solution

The Windows Resource Kit has any executable, `srvany.exe` that can be used, as described here, to run basically any exe as a service. The setup is a little convoluted (requires a registry edit), but should work for most things that can be run as a user applicaiton.

Problem

What is the cleanest, most reliable way to run a Windows application as a service without touching its code? Use case: NorthScale's 64-bit Windows version of memcached runs as a generic application. I'd like to stick it into a Windows 2003 or 2008 Service so I can start/stop/restart/etc it through the standard interface.

Original source