WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Run Winbatch as a Service

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

SvcWaitForCmd User Commands

 Keywords:  SvcWaitForCmd User Command Commands

Question:

Could you please explain the following lines from the 'Run as a Native Service' script example in the WinBatch help file.
SERVICE_CONTROL_USER128=28 ;User command 128
SERVICE_CONTROL_USER129=129 ;User command 129
SERVICE_CONTROL_USER130=130 ;User command 130
SERVICE_CONTROL_USER131=31 ;User command 131
SERVICE_CONTROL_USER255=255 ;User command 255

Answer:

Services have the capability of accepting up to 128 different application-defined commands. Windows calls these "user" commands in the sense that an user-written servcice is a "user" (and not the person) Thus you can write a Winbatch service to "listen" to user defined commands.

The wntSvcControl function can send these commands to a service.


Article ID:   W15684
File Created: 2003:05:13:11:29:32
Last Updated: 2003:05:13:11:29:32