... [tclsvc - Tcl as an NT Service] ... [Tcl as an NT Service] This is the rough equivalent of what the Unix world knows as a [daemon]. [[Much more.]] ---- '''Tcl As A Win95/98/ME Service''' Windows 95/98/ME can provide a simple sort of service - that is a program operating in the background independant of user logins - by creating a registry key that is read during system startup. To create a Win98 service you should create a string value under the key ''HKEY_LOCAL_MACHINE\Software\Microsoft\CurrentVersion\RunServices'' such as ''"MyService" = "...\wish.exe ...\script.tcl"'' The RunServices key is read during system startup and all the service programs are started before the user logs in. Unfortunately when the user logs out, the service will be stopped unless a call is made to the SCM (Service Configuration Manager) to register the process as a service at run time. The call to be made is found in kernel32.dll and is RegisterServiceProcess(DWORD processID, DWORD boolRegister) Once a process is registered it will not be terminated on user logout and will remain until system shutdown. I've written a simple single file package to provide a Tcl interface to this call [http://tclsoap.sourceforge.net/tclsvc9x.zip] registerservice ?-processid PID? true|false will let you register your script with the SCM so that it carries on running after the user logs out. This is not the same as the NT service stuff. NT services are much better supported by the operating system and are to be reccommended over the Win98 style of ''pseudo''-service. That said - this is a solution for this platform. [PT] ---- ServiceInstaller for Windows NT [http://www.kcmultimedia.com/smaster/] is a no-charge product that that makes any executable into a service. as of today, 2002/11/13, the download link on the home page above is broken. [EF] but you can download this at sourceforge [http://prdownloads.sourceforge.net/windrop/srvinst13b.exe?download]. I use this to great effect with [Starpack]s [AF] ---- '''Firedaemon''' [http://www.firedaemon.com/] is utility that allows you to install and run virtually any native Win32 application or script as a Windows NT/2K/XP service. FireDaemon is easy to configure through a GUI and also has a console interface. The GUI is really a bridge into the console interface. Firedaemon comes in two flavors: a free Lite version (with limited functionality for non-commercial use) and a fully functional Pro version. I had great success with the lite version, it contains a myriad of options and installing my script as a service was a matter of minutes. I can start and stop the service both from the FireDaemon GUI interface and from the standard Windows interface without any problems. [EF] ---- "How To Create a User-Defined Service under NT" [http://www.pyeung.com/userdefinedservice.html] Note that the SRVANY described there does ''not'' have the intelligence to realize that a service has crashed, and is no longer in the process table. Despite this, srvany is apparently widely used as a utility which allows any .exe to serve as a service. ---- See also http://www.doc.ic.ac.uk/~np2/software/tcl-setup.html for information about integrating Tcl with the NT Shell. ---- [WJR] - Activestate's [Tcl Dev Kit] has a Service Manager application that turns Tcl scripts into Windows NT, 2000, 2003, XP services. We've used it in production quite a bit, and it's proven to be reliable. ---- The [TWAPI] extension contains a full set of commands for configuration and management of Windows services.