UPDATED to support passing settings directory from the service or systray.
UPDATED to be compatible with cygwin 1.7, and show version in file properties.
To get tivoserver to launch as a service, I had to hard code a few things, so tivoserver.exe
(and the cygwin1.dll) must exist in the same directory with tivoserver_service.exe
(same for tivoserver_tray), and once installed as a service, you must
manually change the service to login as a user, and to autostart if you wish.
Before setting up the service, make sure that TS runs properly
by opening a command prompt, then CD to your tivoserver directory.
Enter the command "tivoserver_service -t" to test that it loads properly.
(If you just launch TSS without flags (except -d), it will restart forever)
Control-C a few times to watch the service restart until you get a
pop-up window about restarting too many times. (only the test has a limit)
Next, enter "tivoserver_service -i" to install the windows service.
There is also a "-r" flag to remove the service, and "-h" for help.
If you wanted to pass arguments down to tivoserver.exe from the service,
install with explicit path to the service executable plus args, EX:
tivoserver_service.exe -i C:\tivoserver\tivoserver_service.exe -d C:\tivoserver
To test before installing the service, you can also use the -d flag in test mode:
tivoserver_service.exe -t -d C:\tivoserver
Open the services control panel, then open the properties for the TivoServer service.
Set startup type to 'Automatic', if you want it to reload after a system reboot.
If not using the '-d' settings directory option, or for builds earlier than -a7:
Click the 'Log On' tab, then the radio button for 'This Account', and
enter your login id and password for the service.
tivoserver will run under whatever security settings you give it,
so that account must have a home directory for the .tivoserver settings directory,
and must have security permission to access any media directories you tell it to.
Tivoserver_service can now run as the LocalSystem account without setting a password,
as long as you specify a '-d' directory for tivoserver to use, AND use a version of
tivoserver which supports reading the '-d' command line before checking
the user's home directory (-a7 or later). By default, the service will
start with an interactive console window. If you don't want to see the console,
check the 'Log On' tab in the service properties, and unselect the checkbox for
"Allow service to interact with the desktop".
The requirements that tivoserver running as LocalSystem have read permission
to the video directories still applies, and MUST have write permission to the
.tivoserver settings directory.
REQUIRES TivoServer 0.4.4-a7 or later for LocalSystem + '-d' to work!!
Also included below is a win32 app to run tivoserver hidden behind a systray icon.
It's really simple, put it in the same directory as tivoserver.exe and run it.
TST now supports -d directory arg for tivoserver startup as well.
(Tray app based on code written by original TS author WSewell)
Both service and tray apps should allow any number of arguments to pass down
to TivoServer, just make sure the -d is the first one, EX:
tivoserver_tray.exe -d c:\tivoserver -s TivoServName -l 5
Neither tivoserver_service or tivoserver_tray are designed to run more than one copy,
so if you need more than one instance of tivoserver.exe, you'll still have to run it manually,
or run one copy as a service and on in the systray (with separate settings directories specified)
tivoserver_service.exe and tivoserver_tray.exe in here.
(Should support earlier versions of tivoserver.exe as well, not just my builds)
[Earlier than 0.4.4-a7 requires setting a login id and password for the service]