You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. XYSystem Components Help
  2. [Copyright]
  3. [Table of Contents]
  4. XYNTService
  5. XYNTService is an NT service program that can be used to start and stop other programs. If you are using Windows NT 4.0 or later, it is recommended that you start XYRoot, XYDataManager, XYDispatcher, and other server processes using XYNTService. When started by XYNTService, the processes will be able to run without user login to the operating system. Only authorized persons are allowed to start and stop the processes.
  6. Here is how to use XYNTService.
  7. Using XYNTService To Start And Stop Other Processes
  8. First, the environment variable XYSYSTEMSERVICE_INIFILE represents the full path of the configuration file. If this environment variable is not defined, the default configuration file will be XYNTService.ini in the same directory as the executable. The ProcCount value in the Settings section of the configuration file is the total number of processes that XYNTService needs to start. For each of these processes, the CommandLine value in the ProcessX section of the configuration file is the command used to start the process, here X is the index (between 0 and ProcCount-1 ) of the process. When XYNTService is started, it will start all the processes defined in the configuration file. When XYNTService is stopped, the processes started by it will also be stopped in the reverse order with an exception noted later.
  9. To install the XYNTService, run the following at the command prompt:
  10. XYNTService -i
  11. Note that some programs may need to access a user's registry settings. If these programs are started by XYNTService, then XYNTService needs to be run under the corresponding user's account. This can be configured using the Services icon in the control panel.
  12. To uninstall the XYNTService, run the following at the command prompt:
  13. XYNTService -u
  14. By default, the installed NT service will be started automatically whenever the machine is rebooted. It can also be started and stopped using the Services icon in the control panel.
  15. Here is a sample configuration file for XYNTService:
  16. [Settings]
  17. ProcCount=3
  18. LogFile=XYNTService.log
  19. [Process0]
  20. CommandLine=XYRoot
  21. UserInterface=No
  22. PauseStart=1000
  23. PauseEnd=1000
  24. [Process1]
  25. CommandLine=XYDataManager
  26. UserInterface=No
  27. PauseStart=1000
  28. PauseEnd=1000
  29. [Process2]
  30. CommandLine=java XYRoot.XYRoot XYRootJava.ini
  31. UserInterface=No
  32. PauseStart=1000
  33. PauseEnd=1000
  34. The parameter UserInterface indicates whether the process has a visible user interface. The parameter PauseStart indicates the number of milliseconds to wait after starting the current process. The parameter PauseEnd indicates the number milliseconds to wait before terminating the current process by force, this will give the current process a chance to shutdown itself.
  35. Note that a process started by XYNTService is visible only when the UserInterface parameter is Yes and XYNTService is running under the default system account.
  36. While XYNTService is running, it also possible to bounce a process it had started. The following command, for example, will shutdown and restart Process2 defined in the .ini file:
  37. XYNTService -b 2
  38. To shutdown and restart XYNTService itself (which will bounce all processes defined in the .ini file), use this command:
  39. XYNTService -b
  40. Using XYNTService To Start And Stop Other Services
  41. In addition, XYNTService has the capability to start and stop other services. To start the IIS server (theMicrostoft Web Server), for example, you need only to execute the following command line:
  42. XYNTService -r IISADMIN
  43. The following command line will kill the IIS server:
  44. XYNTService -k IISADMIN
  45. The general syntax of using XYNTService to start another service is:
  46. XYNTService -r NameOfServiceToStart [other parameters for the given service]
  47. The general syntax of using XYNTService to stop another service is:
  48. XYNTService -k NameOfServiceToStop
  49. In particular, you can use the above commands to start and stop XYNTService itself.
  50. [Table of Contents]