Running Azureus or an App as a Service
Before you can set this up you need to download the Windows XP Support Tools to the computer you want to set the service up on, you can download this from:
http://www.petri.co.il/download_windows_xp_reskit_tools.htm
-
Install the tools on the computer and for ease of use rename the folder to Reskit.
-
At a MS-DOS command prompt(running CMD.EXE), type the following command:
path\INSTSRV.EXE My Service path\SRVANY.EXE
where path is the drive and directory of the Windows XP Resource Kit (i.e., C:\RESKIT) and My Service is the name of the service you are creating.
Example:
C:\progra~1\Reskit\Tools\Instsrv.exe Azureus c:\progra~1\Reskit\Srvany.exe
-
You should then get a message saying the service has been successfully added.
Now you need to edit the registry so that the new service will start and run correctly.
-
Run Registry Editor (Regedt32.exe) and locate the following subkey:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Azureus
- Create a batch file C:\progra~1\Azureus\Azureus.bat with the following content:
set classpath="C:\Program Files\Azureus\swt.jar;C:\Program Files\Azureus\Azureus2.jar"
java -Xrs -D"java.library.path=C:\Program Files\Azureus" -classpath %classpath% org.gudy.azureus2.ui.swt.Main
-
Right click on the subkey (Azureus) and select new key and call it Parameters, right click on the parameters key you have just created and select new string value. Name the value Application, right click on this and select modify, enter the full path to the batch file (c:\progra~1\Azureus\Azureus.bat).
-
Open the Services GUI, you can find this in Settings -> Administrative Tools -> Services .
-
Double click the newly created service to bring the Properties sheet, select the Log On tab and make sure the box Allow Service to Interact with Desktop is unticked.
-
Select the Recovery tab and select the computers response if the service fails then click apply and ok.
-
Start the service and check it is running with the Task Manager (it will appear as a Java.exe process). The service should run as without any kind of GUI and will run as windows starts.
Editing Azureus Settings
What about editing the setting of this Azureus service? To do that you complete the following procedure:
- Stop the service, if you find that Java.exe is still running in the task manager, you should kill it from there.
- Double click the newly created service to bring the properties sheet up again, select the log on tab and
tick the box Allow Service to Interact with Desktop.
- Start the service. The Azureus GUI should now appear.
- Edit the settings until you're happy
- On the properties sheet up again, select the log on tab and
untick the box Allow Service to Interact with Desktop.
- Restart the service
Deleteing the Service
If you make a mistake you can delete the service and start again by running an MS-DOS command prompt (running CMD.EXE). Then type “sc delete service name” (service name being the name of the service you want to delete).