![]() |
![]() |
![]() ![]() ![]() ![]() | |||||||||
| |||||||||
RunExeSvc Admin Tool User's GuideWhat Is It?This utility includes two programs,RunExeSvc.exe and
RunExeSvcAdmin.exe. RunExeSvc.exe is a generic
Windows NT service program, used to run any non-service executables, usually
server programs, as Windows NT services. To do so, a new service is set up,
using RunExeSvc.exe as the service executable, along with a
registry key and its values. When that service is being started, say, by the
control panel's service applet, RunExeSvc.exe will use the
service name to locate the registry key for the program information. This is
certainly doable by hand, but is tedious, error prone and time consuming. A
user-friendly admin tool, RunExeSvcAdmin.exe, is provided for
this purpose. In fact, all you need to know is how to use the admin tool.
How to Install?Download the zip file, unzip all files into a directory. That's all. The only requirement is to keepRunExeSvc.exe
and RunExeSvcAdmin.exe in the same directory.
How Does It Work?In essence, to run a program, the operating system needs three pieces of information: command line, current directory and environment variables.When RunExeSvc.exe is run on behalf of a service, it locates
the registry key based on the service name, then looks for a value called
script . This value contains lines of name=value pairs,
which are used as the run-time environment variables. Among them,
RunExeSvc.exe looks for 3 particular variables:
cmdline (the command line), home (the current
directory), and debug (a flag that, when set to true,
RunExeSvc.exe will display all the relevant information before
proceeding to run the executable). The following are the major screens of the
admin tool.
As you see, the main screen lists all the services defined by this utlity. You can update or delete the services, or create new ones, either by cloning existing ones or starting all over.
On the detail definition screen, the two main fields are the servcie name and the script editor. In the upper-right corner, a couple of helper buttons can generate an initial and sample script for your convenience. The ScriptAs the sample screen shows, '#' starts a comment message. It can be at the beginning or middle of a line. Variables can be referenced in the value part. They are surrounded by '$'-s. All the system environment variables are inherited at the time of running. Variables in the script are then evaluated from top down. There are no other flow control mechanisms supported, in order to keep the scripting to the simplest possible form. Consecutive ''-s are combined into a single one, so it is always safe to
write Special VariablesThree variable names are reserved with special meanings.
Registry KeyRunExeSvc.exe uses a predefined registry key to run a service for
a particular executable. The key is
Command-line OptionsRunExeSvcAdmin.exe version 1.0.1 and up takes these
command-line parameters:
-n service_name -s script_filenameso that installation programs can programatically install a service without having to launch the GUI. |
|
| ||||||||