The procedure to create TM Command as a Windows Service:
1) Create a batch file that has commands to be executed. This is exactly the same batch that we use to perform translation using TMCmd. I have used multiple translation commands with assembly files so that it will take longer time for execution.
2) Convert this batch file to a .EXE file. There are some free tools available like Batch to EXE converter which can be used to create an .EXE from batch file. I have used the default setting while using that tool.
3) The .EXE file created in Step 2 is used to create the Windows Service. The Windows Service can be created using Windows Powershell command line and the sc.exe command or a free tool like srvman.exe. The cleanest site to download srvman.exe from is http://tools.sysprogs.org/srvman. See the image of srvman.exe(Service Manager) below:
To Add a Service, click on the "Add Service" button which opens the “Service Properties” window:
Typically, start mode is set to "manual" but if we want the service to run automatically when the system is booted and not logged in to any user then set it to "Auto (Started by Service Control Manager during Startup)”.
4) The service created can be launched from “Control Panel” then “Administrative Tools” then “Services” or by using the “Windows Key” + R (run command) and type Services.msc and press enter. Once the service properties box is open scroll to the MY_TMCmd_service and click “Start Service”.