IntControl 1001

Syntax:

IntControl (1001, p1, 0, 0, 0)

 

Set service process status.

p1 Meaning

0 Run as a normal application (default). 

1 Run as a service. 

 

If WinBatch is running as a service, it will not be closed when the user logs out.

Windows NT and newer: It is not necessary to use IntControl 1001 in order to run a WinBatch service, but doing so will not hurt. To create a compiled WinBatch program that will run as a native service under Windows NT+: compile the WinBatch script as usual using the WinBatch Compiler, but specify an output file with an extension of ".EXS" instead of ".EXE". Alternatively, you can simply rename an existing WinBatch program (version 2001 and higher) by changing its extension from ".EXE" to ".EXS". You can install a WinBatch service (or any service) using the wntSvcCreate function in the WIL Windows NT extender. See the WinBatch help file for further details on running a WinBatch script as a native service.

Returns @TRUE on success, @FALSE on failure.