I'd like a clarification on the/N switch

Aug 23, 2010
688
9
The documentation states that

/N If TCC was started as a service, use the /N option to prevent TCC from being closed on a Windows CTRL_LOGOFF_EVENT.
However, description for _SERVICE internal variable states that
_SERVICE returns 1 if TCC was started as a service (TCC /N).
…which apparently implies that "/N" option not only prevents reaction to CTRL_LOGOFF_EVENT, but also enables TCC to report as a system service.

What is true?
 
Aug 23, 2010
688
9
You can install TCC (batch file) as system service and it would not require wrappers like srvany or what not.
 
May 20, 2008
12,171
133
Syracuse, NY, USA
You can install TCC (batch file) as system service and it would not require wrappers like srvany or what not.
Where did you find that info? What batch file? _SERVICE was introduced in version 11, the "/D" startup option documented much later (v15?). I have never seen an explanation of what "started as a service" means.

I'm not surprised that it doesn't work. Neither TCC.EXE nor TAKECMD.DLL import the two most basic functions needed by a service, RegisterServiceCtrlHandler(), and SetServiceStatus().
 

rconn

Administrator
Staff member
May 14, 2008
12,557
167
TCC does not have the built-in support to run as a service. (Any more - it did at one time, but it was causing some compatibility issues.)

The /N option is intended to be used when you're wrapping TCC with a third-party "run as a service" app. It's of extremely limited use, and was originally done for a single corporate customer who had a custom TCC configuration.
 
Aug 23, 2010
688
9
What kind of issues, I'm wondering? Since service entry is separate from main one, and you don't have to call it.
 

Similar threads