Intranet/Hosting Toolkit [table of contents]
[CFX_Services]
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

Foreword

General
Services

Version History

top

G E N E R A L

ABOUT

<CFX_Services ACTION="ABOUT">

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.

Description
The general product description.
Version
The version number of the software, ie 2.0.
Quality

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.

SubVersion
The subversion number of the software, ie 4 for "2.0beta4".
SerialNumber
Currently unused.
Lines
The total lines of c/c++ code in the software.
BuildDate
The ODBC DATETIME when the tag was last compiled (built).
Evaluation
Boolean field (0 or 1). 1 indicates the version of the tag you're using is a time-limited evaluation version. 0 is full commercial.
ExpirationDate
The ODBC DATETIME date when the tag will stop working.




top

S E R V I C E S

Some of the important NT Services you'll probably be interested in are:




SERVICES

<CFX_SERVICES ACTION="SERVICES">

FIELDS
Namestring
Descriptionstring
Statusstring
Startupstring
Dependenciescsv string
Accountstring
REQUIRED
ActionSERVICES
Domainstring
Computerstring

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">





STOP

<CFX_SERVICES ACTION="STOP">

REQUIRED
ActionSTOP
Domainstring
Computerstring
Servicestring

Stops an NT service.

Example: <CFX_SERVICES ACTION="STOP" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">





START

<CFX_SERVICES ACTION="START">

REQUIRED
ActionSTART
Domainstring
Computerstring
Servicestring

Starts an NT service.

Example: <CFX_SERVICES ACTION="START" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">





PAUSE

<CFX_SERVICES ACTION="PAUSE">

REQUIRED
ActionPAUSE
Domainstring
Computerstring
Servicestring

Pauses an NT service.

Example: <CFX_SERVICES ACTION="PAUSE" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">





CONTINUE

<CFX_SERVICES ACTION="CONTINUE">
REQUIRED
ActionCONTINUE
Domainstring
Computerstring
Servicestring

Continue an NT service.

Example: <CFX_SERVICES ACTION="CONTINUE" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">





RESTART

<CFX_SERVICES ACTION="RESTART">

REQUIRED
ActionRESTART
Domainstring
Computerstring
Servicestring

Restarts an NT service (does a STOP then immediately does a START).

Example: <CFX_SERVICES ACTION="RESTART" DOMAIN="FOUNDATION" COMPUTER="SUSY" SERVICE="MSFTPSVC">






top

VERSION HISTORY

[In the chair, 1969. C-O-L-D F-U-S...]





top
f i n i
-{ts '2001-12-03 03:35:33'} /ihtkdocs/Services/index.cfm-