By Ramon Leon - 30 September 2006 under Seaside
There are various methods for running Squeak as a service under windows, however, the only one I've found to work well is using srvany from the Windows NT Resource Kit. I drop both srvany and instsrv into the windows/system32 directory so they're available from the command prompt.
To setup a Squeak image as a service, I pull up a command prompt and run the following...
instsrv $Name$ c:\\winnt\\system32\\srvany.exe
where $Name$ is usually the application name this image will be hosting. Then, to avoid editing the registry by hand, I have a template on hand that I edit to include the additional info necessary to get Squeak going. It looks like this...
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Services\\$Name$\\Parameters] "AppDirectory"="C:\\\\Program Files\\\\Squeak" "Application"="squeak.exe" "AppParameters"="-headless C:\\\\PathToSqueak\\\\Squeak3.8.1Working.image"
I edit the $Name$ to match the previously chosen name. Edit the path to Squeak to point to the directory the image is in, which ends up in a directory matching the service name, usually somewhere of the Inetpub directory. I save the template and double click it to enter the info into the registry. Then I'll fire up the image one last time by hand, choose a port for the Comanche web server to run on, make sure everything is working, shut it down, and start the service.
From here on out, I usually manage the image via the "screen shot" and "versions" applications built into Seaside, and one small auto upgrade script I wrote that points to my Monticello repository and loads the latest version of any package I point it at.