Slush mining proxy as service in Windows

This is simple tutorial about how to start Slush mining proxy as service on Windows PC.
For reference I’ve used this on Windows 2003 server, but it should be same on other versions as well. Basic knowledge of Windows and it’s components is required.
Things we’ll need:

After we have installed the Resource Kit, the 2 files (srvany.exe & instsrv.exe) can be found at: C:\Program Files\Windows Resource Kits\Tools\ 
I suggest you copy these 2 files to C:\Windows\system32\ for easier typing on the command shell later on.

1. Start command shell (cmd.exe) and browse to C:\Windows\system32\

2. Install the "custom" service by typing following command:

    instsrv ANYNAME C:\Windows\system32\srvany.exe

Note that you must specify full path to the srvany.exe, even that we are in same folder. You can  (and should) of course replace ANYNAME with your own. At this point we only create the custom service and only specifying its name. I used Proxyservice as name in this example. 

    Screenshot above shows whole procedure.
    Note that the first try without full path gives error, so we try again with full path and get the right response.



3. Open Registry Editor by typing regedit on the "Run…" box under the Start-menu.
– I’ll call the registry keys as "folder" in the following, even they are not really folders, but the icon shows them as ones.

4. Browse to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Proxyservice (The last "folder" is our desided name for the service.)

Now we need to create few things in the "folder" before we can finally start our new service:
– a key called Parameters and
– two string values called Application and AppParameters

5. Right-click the "folder" Proxyservice and choose New -> Key. A new "folder" appears. Rename this New key #1 to Parameters

6. Right-click the "folder" Proxyservice again and choose this time New -> String Value.
Repeat that once more. Now there should be New Value #1 and New Value #2 inside the Parameters key. Rename these to Application and AppParameters

7. The Application value points to the application we want to start as service, in our case it is the mining_proxy.exe. Edit the value to C:\miningproxy\mining_proxy.exe

8. The AppParameters are the same command line parameters that you can use when starting mining proxy from batch-file (.bat). If you’re mining at Slush’s pool, you can leave this empty, as the mining_proxy connects to Slush as default.
In this example I used pool, so we edit the value to -o -q

Now that everything has been set, the key and its strings should look like following:

9. Go to Control Panel -> Administrative Tools -> Services and you should find the service there with name Proxyservice. If everything is correct, try start the service and it should run finally! 

You can see it running on Task Manager with name mining_proxy.exe

(Just remember check the box "show processes from all users" to see it.)

P.S. For those who can’t bother to edit Registry by own, here is .reg file for that:
Copy it to emtpy textfile and name it whatever.reg 
Note that there must be an empty line at the bottom of the file and yet again, replace Proxyservice with the name you desided earlier, if you changed it.
Windows Registry Editor Version


"AppParameters"="-o -q"