| Intranet/Hosting Toolkit | [table of contents] |
![]() v1.3 November 30th 2001 |
CFX_Services
OPEN-SOURCE NT DLL for Cold Fusion 4.0.1 and up Lewis A. Sellers http://www.intrafoundation.com/ihtk.html ihtk@intrafoundation.com |
|
FOREWORD This is an Allaire Cold Fusion Extension Tag (CFX). It is for use with Allaire Cold Fusion Servers 4.01 (and up) running on Microsoft NT. It was written by Lewis A. Sellers of Intrafoundation Software. The purpose of CFX_Services is to stop or start an NT service such as the IIS Web or FTP services. This is of use with CFX_IIS in resesting IIS after an update. Please read the version history for current tag status before emailing questions. |
C O N T E N T S |
The tag itself returns a couple variables back no matter what you do (ServicesDescription, ServicesVersion and ServicesError). These are always available unless there is a catastrophic failure of the tag.
Additionally you can use the ABOUT function to return more detailed information on the tag. The fields returned are mostly only of interest for curiosity or in debugging a situation.
Note below that though the tag returns it's SerialNumber, it's not used currently, and hasn't been for a very long time, but probably will be again soon.
For the curious, it also proves the total number of lines of c/c++ that the current build was using. This includes the scant comments in the source code. For instance, this build of the tag has 614 lines of code.
The quality field will be one of the following four: "Alpha", "Beta", "Gamma" or "Omega". Quality relates the quality control status of the version of the tag you're currently using.
Alpha code is highly unstable and shouldn't be trusted for anything. Do not use on production machines.
Beta code is close to being finish and it is in a debugging phase. Do not use on production machines.
Gamma code is for use on production machines. As far as the beta testers have determined it works as it should.
When a product goes Omega that generally means it is long used Gamma code that is now no longer being maintained.
Some of the important NT Services you'll probably be interested in are:
| FIELDS | |
|---|---|
| Name | string |
| Description | string |
| Status | string |
| Startup | string |
| Dependencies | csv string |
| Account | string |
| REQUIRED | |
|---|---|
| Action | SERVICES |
| Domain | string |
| Computer | string |
Lists all the services on a computer and their current status.
When trying to start or stop a service use the NAME for the SERVICE parameter.
The Dependencies field is a csv (comma seperated list) of all other services this service depends on. Typically you have to stop all it's dependencies first before you can stop a service.
The status of a service is returned as a text value which may be any of the following values (sic):
Startup describes how the service normally starts up.
The Account field is the name of the NT Account (see CFX_UserManager) that this service runs under.
Example: <CFX_SERVICES ACTION="SERVICES" DOMAIN="FOUNDATION" COMPUTER="SUSY">
| REQUIRED | |
|---|---|
| Action | STOP |
| Domain | string |
| Computer | string |
| Service | string |
Stops an NT service.
Example: <CFX_SERVICES ACTION="STOP" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">
| REQUIRED | |
|---|---|
| Action | START |
| Domain | string |
| Computer | string |
| Service | string |
Starts an NT service.
Example: <CFX_SERVICES ACTION="START" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">
| REQUIRED | |
|---|---|
| Action | PAUSE |
| Domain | string |
| Computer | string |
| Service | string |
Pauses an NT service.
Example: <CFX_SERVICES ACTION="PAUSE" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">
| REQUIRED | |
|---|---|
| Action | CONTINUE |
| Domain | string |
| Computer | string |
| Service | string |
Continue an NT service.
Example: <CFX_SERVICES ACTION="CONTINUE" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">
| REQUIRED | |
|---|---|
| Action | RESTART |
| Domain | string |
| Computer | string |
| Service | string |
Restarts an NT service (does a STOP then immediately does a START).
Example: <CFX_SERVICES ACTION="RESTART" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">
Added IHTKPASSWORD. Upgraded reporting code.
Upgraded error reporting code to v1.2.
This tag started out as a few functions added to CFX_IIS last night. Thought about it today and it made more sense to place them in their own tag, so I did.
The purpose of this tag is to support CFX_IIS.
Windows 2000 or ADSI 2.5 or higher on NT4 is required for this tag to work.