March 31, 2015
Say Goodbye to ctntinst
Many Windows platform developers are familiar with a c‑tree utility that shipped with earlier versions of c‑treeACE:ctntinst.exe, the c‑tree NT Installation Utility. This utility installed c‑treeACE as a Windows service. However, since V9, c‑treeACE installs as a Windows service by default using our Windows .msi installer. ctntinst.exe duplicates existing functionality of the Windows Service Control utility, sc.exe, included with all current Microsoft Windows distributions. As such, ctntinst.exe no longer ships with c‑treeACE as of V10.3.
Service Installation with sc.exe
To install c‑treeACE as a service, use the Microsoft Service Control utility, sc.exe, provided with your Windows installation. Adjust the following command-line to match the c‑treeACE version and path of your installation (pay particular attention to required spaces after the “=” signs!):
>sc <windows UNC> create "c-treeACE Database Engine" binPath= c:\FairCom\V10.4.0\win32\bin\ace\sql\ctreesql.exe start= auto DisplayName= "c-tree Advanced Core Database Engine"
Use the Windows Services section of the Management Console to further configure and control the service once installed.
Tip: The c‑treeACE Replication Agent also runs as a MS Windows service and can be installed in the same manner.
Configuration and Administration
The Microsoft Windows Services Control Panel applet is the preferred method for configuration and other administration, such as starting/stopping your c‑treeACE service. This provides you with a fully Windows-compliant method of managing your c‑treeACE database. Reach this applet from the Computer Management utility, under Administrative Tools in both the Start menu and Control Panel. It is also accessible from the Services tab in Task Manager. Any way you get there, it provides information about the service, the ability to set automatic or manual startup, buttons to Start and Stop it manually, as well as other controls.
The c‑treeACE service has two configurable properties: Startup Type and Logon User. These can be set using the Windows Services Control Panel applet (see the images below).
Open the Windows Control Panel by clicking Start > Settings > Control Panel.
- Select the Services applet. You will be presented with a list of the installed services (see the following figure, the Services applet in the Windows Control Panel):
- Select the c‑treeACE service, then double-click it or right-click and choose Properties.
- The c‑treeACE Database Engine Properties window will appear. Set the Startup Type and Logon User as desired.
The service can be stopped by using either the Microsoft sc.exe command or the Windows Services Control Panel applet. For the exact syntax of the sc.exe command, see its help by typing sc at a command-line.
The current status of the service can be displayed by using either the Microsoft sc.exe command or the Windows Services Control Panel applet. To check the current status of the service using sc.exe, type the following at a command-line:
sc query ctreesql.exe
With current installers and Microsoft’s sc.exe utililty, it was time to retire ctntinst.exe and make your c‑treeACE deployments that much cleaner for spring.