CometAsService

From CometWiki

Jump to: navigation, search

Comet As Service or CAS, is a utility that will allow Comet to be run as a CometAnywhere host automatically at system start-up without the need to have a user physically log onto the computer. This is accomplished by configuring a system service that will be started when Windows is started.

CAS consists primarily of two executable programs. CometAsService.exe is the actual service program and is responsible for starting the regular Comet programs as you would from a desktop shortcut. CasMonitor.exe is a program that displays a system tray icon showing the status of CAS. This icon will be yellow if CAS has not been started and it will be blue if CAS has been started. By right-clicking on the tray icon a menu will show the options to configure CAS, start/stop CAS, and Show Comet.log.

When CAS is running, the usual Comet programs (except Cosw.exe) will be started. For Windows versions beginning with Vista there will be no way to connect a local Cosw session to Comet. Only a CometAnywhere client (/NET) will be able to connect. Therefore the configuration (/PN=) should be for a CometAnywhere host with mostly "Type 3" session types.


Setting up CAS is done in several steps.

Step 1. Ensure that the account that will be used for running Comet has administrator rights (this may soon change so that standard "Guest" rights will work).

Step 2. Configure Comet and ensure that it is running as expected and that all features required are enabled.

Step 3. Unzip CometAsService.zip into the Comet Services folder.

Step 4. Create a shortcut to CasMonitor.exe in the Users "startup" menu folder to allow CasMonitor.exe to be run automatically when the user logs in. Double-click the shortcut to start CasMonitor.exe observing a yellow Comet icon appearing in the system tray.

Step 5. Right-click on the tray icon and choose Configuration. Supply the path to the Comet session manager Cosc.exe (eg. c:\Comet\Cosc.exe) and the path to the Comet startup folder. Specify the configuration Profile to be used.

Step 6. Register the CAS service "CometAsService." Administrator rights will be required for this step. This is done by running the program CometAsService.exe (from the "Comet Services" folder) with the "-i" command line option. Once registration is complete, from Control Panel start the Services applet or from the Run prompt "%windir%\system32\services.msc". Locate the CometAsService service which should be displayed in the service list. Right-click on CometAsService to view the properties. Choose the "Log On" tab and select the "This account" radio button. Enter the credentials for the aforementioned account under which Comet will be run and click OK to exit.


That's all for configuration. To test the configuration, again from the Control Panel Services applet right-click on CometAsService and choose "Start" (this will happen automatically at system startup) At this point the tray icon should turn blue to indicate that the service is running. Start Task Manager (view all processes) and you should find Cosc.exe, Cosh.exe (or Cos32.exe), Cfam.exe, ClibNetServe.exe running under session 0 (services). You should now be able to connect to Comet with CometAnywhere.

Personal tools