Installing Serv-U 32 as a Service |
 |
The SrvAny Tutorial
by Michael K. Shannon of NETView Communications, Inc.
Modified to add the "AppParameters" key by Rob
Beckers
NOTE: For WinNT 4.0
Although the tutorial is based on a WinNT3.51 install, these
installation instructions work exactly the same for WinNT40. I have confirmed this and if
you follow the instructions, log in as the Administrator (Not just with admin priv.),
check your paths and spelling, and it'll work fine. |
Microsoft's WinNT RESKIT includes a very useful utility that allows
WinNT users to convert most DeskTop applications into a SERVICE application. This
basically means that you can run an application behind the scenes i.e. it doesn't depend
on a specific user to log on. Another real benefit is that a SERVICE application will
re-activate itself after the WinNT PC looses power and re-boots itself. Great for running
critical mission apps in an unattended mode.
The needed resource kit programs are available for free from Microsoft's FTP
site at ftp://ftp.microsoft.com/bussys/winnt/winnt-public/reskit/nt35/i386/. This link
points to the NT3.5 resource kit, but all SRVANY related programs will also work under
NT3.51 and NT4. |
We use Rob Beckers' Serv-U FTP Server in
this kind of a situation. We use Serv-U to allow users to access to their websites for
updating and for serving software updates, examples, and tools to the general public. We
consider this to be a mission critical situation. Our FTP server has to be available 7
days per week, 24 hours per day.
In response to some requests on how to install and use SRVANY here is a step-by-step
tutorial on how to implement SRVANY using Serv-U FTP Server as an example. We have found
this combination to be bullet-proof. (What other Internet elements can make that kind of a
claim??)
The WinNT RESKIT's SRVANY kit includes 3 files: SRVANY.EXE, SRVANY.WRI, and
INSTSRV.EXE. Here are the steps required to make all this work. It's actually quite easy,
just a little tricky. If you have already been wrestling with this implementation and it's
not working for you here is the most common problem:
Make sure that the setting in the SERVICES APPLET (from the control panel) for your SRVANY
Service name is set for "LOG ON AS SERVICE" and the "Allow Service to
Interact with Desktop" is checked (both apply to the Serv-U installation. Other
installations may vary).
CLICK ON GRAPHIC
Here are the steps to a first time installation:
Step 1
Create a directory under your root and call it SRVANY and copy these three files:
SRVANY.EXE, SRVANY.WRI, and INSTSRV.EXE into the SRVANY directory
Step 2
Go to the DOS Command prompt and navigate to the SRVANY Directory. At the command prompt
type:
INSTSRV SERVUFTP c:\srvany\srvany.exe
 |
Notice the second element on the command line "SERVUFTP". This is the
"name" of the service that you will create. Later, you will go to the SERVICE
applet in the CONTROL CENTER and will access the service by this name. More later. The
point here is that since you are creating a name, you can call it anything you want.
CLICK ON THE GRAPHIC |
|
|
 |
If everything went well, you should see this message. Click on the graphic for the
message. If you do not get this message, review everything that you did so far. Make sure
that the SRVANY.EXE and the INSTSRV.EXE are in the directory that you specify. |
|
|
Step 3
Exit the DOS COMMAND Console, fasten your seat belt and fire up the REGEDT32.EXE. This is
dangerous territory. One false move and you can kill your WinNT. Don't let it put you off
though, just be careful. Don't mess with other stuff while you're in there for this
particular mission. |
|
|
Step 4
Open up the HKEY_LOCAL_MACHINE window and double-click on the SYSTEM branch. The
branch opens up and you should see the CurrentControlSet branch. Double-click on that one
and the Services branch should appear. Double-click on the Services branch and a long list
of branches is displayed. Careful, now you are in the snake pit. |
|
|
Step 5
Scroll down until you find the name of the service that you created. |
 |
It should be SERVUFTP if that's the name you chose earlier. OK, so far so good.
Double-click on SERVUFTP and leave this highlighted. |
|
|
 |
Move the cursor up to the EDIT menu bar and click on "Add Key..." |
|
|
Step 6
The Add Key dialog box is displayed. In the "Key Name" text box type: Parameters
You don't have to enter anything in the "Class" text box. Press OK. |
 |
|
|
Step 7
Highlight the Parameters Key and bring your cursor to the EDIT menu bar
again and click on the Add Value choice.
|
|
|
Step 8
In the "Value Name" text box type in: Application
From the "Data Type" list box choose: REG_SZ
Now press OK |
 |
|
|
Step 9
The String Editor Dialog box will open up. Enter the full path to the Serv-U FTP Server
executable.
In my case its c:\serv-u\serv-u32.exe
Press OK and get outta there. |
 |
|
|
Step 10
Highlight the Parameters Key and once again bring your cursor to the EDIT menu bar again
and click on the Add Value choice to add another key.
In the "Value Name" text box type in: AppParameters
From the "Data Type" list box choose: REG_SZ
and press OK |
 |
|
|
Step 11
When the String Editor dialog box opens up add the options you need. In this example they
are the "/u" and "/h" options. The
"/u" option will ensure Serv-U does not ask questions when NT users log out. The
"/h" option makes the server invisible (no tray-icon and no window). If you want
to run Serv-U interactively you would not use the "/h" option.
Close it all up and exit the REGEDT32 program. Now you can breathe easy again. The worst
is over. Move to the Control Panel, friendly and familiar territory. |
 |
|
|
Step 12 |
|
 |
Open up the SERVICE Applet and scroll to the SERVUFTP line and double click on it. |
|
|
 |
A dialog box opens up. Choose the Startup Type: Automatic (for unattended operation,
this will allow Serv-U to be active when there is no one logged on). Click on the
System Account and Allow Service to Interact with Desktop in the Log On As: section. |
|
|
Step13 (Final)
Press OK, and choose Close in the Services applet. You're done. You can test your setup by
shutting down the machine properly and re-booting. Serv-U FTP will be active before you
even log on. Try to access the FTP Server now from another machine before you log on. Once
the log on is complete, the Serv-U main window will be up and Serv-U FTP will be active.. |
|
|
That's it.
Hint:
To stop the Serv-U FTP Server, exit first from the desk top level; i.e go to the Serv-U
menu and exit. This will allow Serv-U to wait until any active connections are closed.
Then stop the services. If you just stop from the Services applet, any active connections
will be dropped immediately without warning, NOT nice. |
If you have any problems with the installation, here's a link to Microsoft's
Knowledge Base to help you figure out what's wrong. www.microsoft.com/kb/articles/q152/4/60.htm
|