From KC Multimedia and Design Group...
lt top hrt
right Hot Links right
Edit your profile   Registration is free!   Find
other members
Frequently Asked
Questions   Search   Home
lb bot rb

ServiceInstallertm for Windows NT 4.0

Version 1.3b - October 5, 2000

ServiceInstaller is a FREE utility that makes it easy to install programs as Windows NT Services, including pure Javatm applications, without manually editing the registry!

What's New...

October 5, 2000 - No changes have been made since the last version. But we're pleased to announce (and we've added a link to) JVMI, a Java VM invoker that provides an easy workaround for the JDK 1.3 logoff issue.

May 12, 2000 - Now permits very long classpaths.

May 9, 2000 - Fixed a bug involving truncation of the specified working directory name.

May 6, 2000 - Version 1.3 provides for command line removal of services and fixes a bug that only permitted a maximum 0f 260 characters for individual arguments.

April 2, 2000 - Version 1.2 provides for command line service installations.

March 14, 2000 - Version 1.1  permits specifying a working directory for the application that you are installing as a service. This is especially useful for Java apps that expect to start in a certain directory for locating support files, outputting log files, etc. This version will also handle embedded spaces within arguments (such as pathnames) if the argument is set off with double quotes.

Download ServiceInstaller in a self-installing setup program (about 1.3 MB.) If you are installing a Java app as a service, you might also download a very simple Java application example (Zipped, about 2 KB). You can also browse the example's readme file.

Note: Before replacing a previous installation of ServiceInstaller (or KCMDG ServiceMaster 1.0) please browse readme.txt

Important JDK 1.3 Note - At the time this is written (5 Oct 2000), it is confirmed that the Java VM started with java.exe in JDK 1.3 will stop running when a user logs off.   For JDK 1.3, we are aware of two alternatives. We offer JVMI, an easy and inexpensive substitute for java.exe that will keep java running through a logoff (free evaluation download.). If you are comfortable with VC++,  our other solution is available in our free, fully documented Javaserv framework and tutorial (see next paragraph.)

Java Programmers... check out our free framework for running Java 2 applications (including JDK 1.3) as NT services, with complete source code in C and Java , including code for passing NT service events to a listener in your pure java application. Available at

How it works...

ServiceInstaller consists of two programs: a service configuration program that provides a friendly dialog-box interface for installing or removing services and a second Win32 application that executes behind the scenes as the actual service that runs the programs of your choice.

Here's a screenshot of servinst.exe, the service configuration program:

smaster.gif (5096 bytes)

This program permits installing/removing your applications to run as NT services, selecting a startup type, optionally naming one or more dependencies upon other services,   providing a string of arguments that corresponds to what would normally be entered at the command line for the application, and the working directory for the application. (Note that services can also be installed using a command line interface with srunner.exe. See readme.txt for details.)

When ServiceInstaller creates a service, it will set up the necessary keys and values in the registry, using the information provided. For example, the information shown in the above screenshot creates an TestService subkey under


registry.gif (5666 bytes)

Notice the ImagePath value, which names ServiceInstaller's companion program, srunner.exe, as the actual service. Srunner.exe contains the actual service code, but it will invoke the application that you specify, with any arguments that you provide.

Pure Java Services?

Easily done. Simply select your java.exe (or jre.exe) as the executable and provide your Java arguments, main class and application arguments in the Arguments field, exactly as if you were running Java at a command line. Any version of Java can be used, Java 1.02 thru Java 1.2, depending upon your Java application's requirements.

Nuts and Bolts

ServiceInstaller is written primarily for Java server applications, by a developer who uses Java 99% of the time. However, there are rare occasions when Java will not do what needs to be done. Thus, ServiceMaster was written with MFC/C++ (the service configuration program) and in Win32/C (the service runner.)

Download ServiceInstaller in a self-installing setup program (about 1.3 Mb.)

Copyright 2000 by Rocky Fikki / Bill Giel
KC Multimedia and Design Group, Inc.
All Rights Reserved.