![]() ![]() |
RunExeSvc Admin Tool User's Guide |
Contents
What is it? |
This utility includes two programs,RunExeSvc.exe
andRunExeSvcAdmin.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, usingRunExeSvc.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.
Download the zip file, unzip all files into a directory. That's all. The only requirement is to keepRunExeSvc.exe
andRunExeSvcAdmin.exe
in the same directory.
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 calledscript
. 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), anddebug
(a flag that, when set to true,RunExeSvc.exe
will display all the relevant information before preceding 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 start 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.
As 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
$JAVA_HOME$\bin\java.exe
, even though you may not be sure if system environment variableJAVA_HOME
ends with a '\'.
RunExeSvc.exe
uses a predefined registry key to run a service for a particular executable. The key is:
LOCAL_MACHINE\Software\WinWinSoft\RunExeSvc\ServiceName
For more information, please visit us at http://www.winwinsoft.com/freebies.htmlTo report bugs, suggestions, comments, please send e-mail to feedback@winwinsoft.com.
You may need the source code to OEM this utility with your product. One reason may be for the registry names. Another one may be the automated installations, such as different service start-up options. Source code for both programs are available. Please contact us for this purpose.