How-To install
the smus as a NT Service feedback : Sébastien |
![]() |
This method works well on Windows NT 3.51, 4 and 2000.
All services under NT are controlled by the Service Control Manager (SCM). Microsoft developed a small utility which is distributed with the Windows NT Resource Kit, and also available at the bottom of this page. The utility is called SRVANY.EXE and acts as a host (or service "wrapper") for your application. In other words, it becomes the service application which does all of the work and communicates with the SCM for you. When it starts, it looks at the registry to find out where your application is located. If it finds it, it starts your application.
The configuration of your application as a NT service is straightforward.
There are two programs Microsoft developed which pulls this trick off. The
first, as I just mentioned, is SRVANY.EXE. SRVANY is a program which resides in
your WINNT\SYSTEM32 folder, or the folder where your application resides. While
in the end you may want to think of your application as a NT service, it's
really this little gem that is the true service. When your service starts, it
actually starts SRVANY, which starts your application.
The second
program Microsoft developed is called INSTSRV.EXE. This program installs SRVANY
as a NT service. It is a command-line driven program, and once used is no longer
needed unless you wish to add another service which uses SRVANY, or you wish to
un-install a previously added service.
While the documentation provided with SRVANY does a good job detailing the steps involved in its use, here's a visual step-by-step guide to installing SRVANY with the Smus :
Assumptions:
- You are logged in as an Administrator. You cannot install a service otherwise
- The smus as been installed with its default settings, and so resides here: c:\Program Files\Macromedia\Shockwave Multiuser Server 3.0\
If you've installed the smus anywhere else, then just use your custom path in the steps below- You've installed both SRVANY.EXE and INSTSRV.EXE into this folder
Step 1: Install SRVANY.EXE
as a service using INSTSRV.EXE
Step 2: Verify that your
service got added by bringing up your services applet (control panel)
windows NT4 view
![]()
windows2OOO view
Step 3 (windows 2000 only):
The default settings for SRVANY on Windows 2000 are not the same as those used on NT4, so an additional checkpoint may be required:
- Go to the HKLM\SYSTEM\CurrentControlSet\Services\Smus3 registry entry
- Check the value of the "ImagePath" string entry
- This value should be the full path to SRVANY including the extension. Correct it if it's not. If you put SRVANY in the smus folder, as described above, this full path should be "c:\Program Files\Macromedia\Shockwave Multiuser Server 3.0\srvany.exe".
At this point, your service has been created. However, if you were to try to start it now, it would fail. You next have to tell SRVANY where the application resides, so it can start it when the SCM starts SRVANY. Follow these steps to complete the installation of your new service:
Step 4: Add a "Parameters"
key:
- Start your registry editor
- Find your service under HKLM\SYSTEM\CurrentControlSet\Services\Smus3
- Create a "Parameters" key
Step 5: Add an "Application"
value:
- Open the "Parameters" key
- Create an "Application" string value (REG_SZ) within the "Parameters" key
- Edit "Application" and specify the full path of the app executable (including the extension) (should be "c:\Program Files\Macromedia\Shockwave Multiuser Server 3.0\MultiuserServer.exe")
Congratulations! You have just successfully turned the smus application into a Windows NT service. There are some other bits of information you should know about SRVANY and your new NT service application:
Download SRVANY
To download SRVANY.EXE, INSTSRV.EXE, and supporting documentation, click the following download link.
SRVANY.ZIP (24k)
Bibliography
Microsoft knowledge base relative documents : click here