Create a Service

  • Thread starter Thread starter Lars
  • Start date Start date
L

Lars

Hi

Is it possible to create a Windows service, that starts a .cmd file ?
I need it to start and stop an application on specific time during the day.

regards

lars
 
|>Hi
|>
|>Is it possible to create a Windows service, that starts a .cmd file ?
|>I need it to start and stop an application on specific time during the day.

instsrv.exe comes with the NT service pack, and will do what you want.

C:\temp>F:\NTRESKIT\INSTSRV.EXE
Installs and removes system services from NT

INSTSRV <service name> (<exe location> | REMOVE)
[-a <Account Name>] [-p <Account Password>]

Install service example:

INSTSRV MyService C:\MyDir\DiskService.Exe
-OR-
INSTSRV MyService C:\mailsrv\mailsrv.exe -a MYDOMAIN\joebob -p foo

Remove service example:

INSTSRV MyService REMOVE
 
You can use the task scheduler to start it and in the settings, you can
specify when it should stop.
Louis
 
Back
Top