PDA

View Full Version : Implementing a *clean* way to run TiVo Desktop


Sensei
12-19-2006, 09:30 PM
* NOTE 1: The following applies to TiVo Desktop 2.3a, though hopefully it will be applicable to future versions as well.

* NOTE 2: The steps listed here involve creating a Batch (.bat) file (Microsoft Windows). Some computer knowledge is obviously helpful here, but really it's not a big deal -- so don't let that scare you off if you're not familiar with it. If you can use Notepad, navigate your computer via Windows Explorer (or "My Computer"), and you can create and modify shortcuts on your system -- that's really all there is to it.


BACKGROUND:
To make a long story short, I only use TiVo Desktop every once in a while (if I want to transfer some shows to my PC, or serve up some audio or picture files to show on my TiVo). Furthermore, I don't like to have a lot of "stuff" running in the background on my computer, especially when that "stuff" wants to start up every time I log in. On my laptop, for example, I really want to keep startup time to a minimum.

Therefore, it's especially frustrating that TiVo Desktop wants several things running in the background, even if all I intend to do is download some .tivo files to my PC. For the most part, in order to use most things in the TiVo Desktop application, the following have to be present:

(The first one you can see in your Services list: Start --> Programs --> Administrative Tools --> Services)
TiVo Beacon:
Whatever this thing really is, TiVo Desktop won't function without it. I believe it's the service that watches for TiVos on your home network.

(The next three are set to startup when you log into your computer. You can see them in Registry Editor (Start --> Run --> regedit), under this key: HKEY_CURRENT_USER\Software\Microsoft\Windows\Current Version\Run)
TiVoNotify:
This seems to be a little application that handles the "notify icon" in the lower-right of the task bar, indicating TiVo Server status.

TiVo Server:
The TiVo Server program, which makes the shared files on your PC available to TiVos on your network.

TiVo Transfer:
A program to aid in transfer of TiVo files, I assume.


WHAT WE'RE TRYING TO ACCOMPLISH:
Essentially, I wanted a way to use the TiVo Desktop without having all this stuff run in the background all the time. Therefore, the problem becomes: How can I turn this stuff on when I need to run TiVo Desktop, and have it all go away when I'm done (in an easy one-step manner)? Moreover, I may need to run TiVo Server occasionally, but I want the same thing -- it should completely "go away" when I'm done using it.


IMPLEMENTATION:
This is another long story which I'll make short, but I pretty much had to toy around with these individual programs to see how/what/when they do stuff -- incorporating some educated guesses from my background as a software programmer and knowledge of Windows services. So, the implementation goes like this:

1) Go to Start --> Programs --> Administrative Tools --> Services --> "TiVo Beacon" and change the Startup Type to "Manual"

2) Open up Notepad, and put this text in there (substitute for the actual location of your TiVo Desktop installation):

"C:\Program Files\Common Files\TiVo Shared\Beacon\TiVoBeacon.exe" /start
"C:\Program Files\TiVo\Desktop\TiVoNotify.exe" /install /quiet
"C:\Program Files\TiVo\Desktop\TiVoNotify.exe" /start
"C:\Program Files\Common Files\TiVo Shared\Transfer\TiVoTransfer.exe" /install /quiet
"C:\Program Files\Common Files\TiVo Shared\Transfer\TiVoTransfer.exe" /start
"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /install /quiet

"C:\Program Files\TiVo\Desktop\TiVoDesktop.exe"

"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /stop
"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /uninstall
"C:\Program Files\Common Files\TiVo Shared\Transfer\TiVoTransfer.exe" /stop
"C:\Program Files\Common Files\TiVo Shared\Transfer\TiVoTransfer.exe" /uninstall
"C:\Program Files\TiVo\Desktop\TiVoNotify.exe" /stop
"C:\Program Files\TiVo\Desktop\TiVoNotify.exe" /uninstall
"C:\Program Files\Common Files\TiVo Shared\Beacon\TiVoBeacon.exe" /stop

* What this essentially does is:
-- Starts the TiVoBeacon service
-- "Installs" the TivoNotify and TiVoTransfer programs, then starts them (although it doesn't really "Install" them -- the /install command line parameter just tells it to insert itself in that registry key I mentioned earlier, since it needs to be there for some reason).
-- Installs the TiVo Server program (but doesn't start it -- you could add an option for that here if you want to, similar to TiVoNotify and TiVoTransfer)
-- Runs TiVo Desktop, and doesn't do anything else until you close it.
-- After you close TiVo Desktop, it stops and "uninstalls" the TiVoServer, TiVoNotify, and TiVoBeacon programs
-- Lastly it stops the TiVoBeacon service.

3) Save this file somewhere (for example, C:\Program Files\TiVo\Desktop), and call it something like "Run TiVo Desktop.bat"

4) Create a shortcut to this file, and call it something like "Run TiVo Desktop". I put mine here: C:\Documents and Settings\All Users\Start Menu\Programs\TiVo Desktop.

And that's basically it. Now, just use the shortcut to that .bat file to run TiVo Desktop, instead of the regular shortcut. In fact I deleted my original shortcut, because it is useless to me now. When using the TiVo Desktop application, you can start the TiVo Server from there if you need to (Server --> "Restart TiVo Server") if you only use it occasionally. If you use it a lot, though, you can add a line in the batch file to call "TiVoServer.exe /start" if you like. Or, see enhancement C below for a way to do this independent of TiVo Desktop.


"Niceties" for making this more user-friendly:
There are a few things I've done which make this even cleaner, and it makes this more intuitive for the end-user (which in this case is likely "you" -- but I also set this up on my wife's laptop computer, for example).

A) Set the .bat file to run minimized in the task bar: In the shortcut you created in step #4 above, change the "Run:" option from "Normal Window" to "Minimized"

B) Give it a meaningful icon. In the setup of this same shortcut file, click the "Change Icon..." button on the Shortcut tab. Navigate to C:\Program Files\TiVo\Desktop (or wherever it's installed on your system), and choose TiVoDesktop.exe for example.

C) Create a batch file to start and stop the TiVo Server. Create a batch file (for example, called "Start TiVo Server.bat") with this text:
"C:\Program Files\Common Files\TiVo Shared\Beacon\TiVoBeacon.exe" /start
"C:\Program Files\TiVo\Desktop\TiVoNotify.exe" /install /quiet
"C:\Program Files\TiVo\Desktop\TiVoNotify.exe" /start
"C:\Program Files\Common Files\TiVo Shared\Transfer\TiVoTransfer.exe" /install /quiet
"C:\Program Files\Common Files\TiVo Shared\Transfer\TiVoTransfer.exe" /start
"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /install /quiet
"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /start

... and one called "Stop TiVo Server.bat" with this text:
"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /stop
"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /uninstall
"C:\Program Files\Common Files\TiVo Shared\Transfer\TiVoTransfer.exe" /stop
"C:\Program Files\Common Files\TiVo Shared\Transfer\TiVoTransfer.exe" /uninstall
"C:\Program Files\TiVo\Desktop\TiVoNotify.exe" /stop
"C:\Program Files\TiVo\Desktop\TiVoNotify.exe" /uninstall
"C:\Program Files\Common Files\TiVo Shared\Beacon\TiVoBeacon.exe" /stop

Create shortcuts to these, so now you can start TiVo Server and have it quietly run in the background if you need to serve up some files, then you can shut it down cleanly (and completely) after you're done with it.

I also set these shortcuts to run Minimized, and gave them the following icons which I thought were more or less appropriate:
C:\Program Files\TiVo\Desktop\TiVoServer.exe
C:\Program Files\TiVo\Desktop\TiVoAutoUpdate.exe

Now that's TiVo (Desktop) *my* way :D

jmace57
12-19-2006, 10:27 PM
Thanks for the hard work and excellent post Sensei.

Jim

Fraser+Dief
12-20-2006, 04:29 AM
Nicely done. (assuming it works, I haven't tried it :) ).

I figured this was possible, and have been meaning to do the same thing myself. I might only transfer files once or twice a month at most.

Sensei
12-21-2006, 02:17 PM
Hope it works out well for others!

Another thing I've done, just for kicks, is put shortcuts to link to the TiVo Web Interface -- in case I want to just connect to the TiVo via Internet Explorer or Firefox and not run TiVo Desktop.

The web interface to your nowplaying list is described in several places, including here:
http://www.tivocommunity.com/tivo-vb/showthread.php?s=&threadid=215838

So, I simply created a shortcut to my web browser with the IP address of my TiVo, which looks like this:
"C:\Program Files\Mozilla Firefox\firefox.exe" https://192.168.1.105/nowplaying/index.html

Then I put that in the same folder as the other shortcuts: C:\Documents and Settings\All Users\Start Menu\Programs\TiVo Desktop.

Again, not a big deal -- but I am to deliver complete solutions to my users.. uh, I guess I mean "myself" ;)

jlb
12-21-2006, 02:32 PM
These go to 11

dknapp47
12-23-2006, 10:35 AM
Thanks for all the hard work on this topic. I have run the .bat files to cleanly start and stop the tivo server and they work great. Now I have a further question.

Our PC has a user on it for each person in the house. I would like the Tivo server to be running no matter who is logged on (even if no one is logged on). This will let me play music as long as the computer is powered up.

I tried setting up a scheduled task to run the start tivo server batch file, but it did not seem to work. The batch file runs and the appropriate processes show up in task manager but then it looks like it tries to start a second server when someone logs on. I believe that I have (it looks like it tries to start a second server when anyone logs on). I have tried unchecking the "Start Tivo Server when I log into Window" property, but it seems to get re-checked all the time. Any thoughts?

sburks92131
12-23-2006, 04:50 PM
You can add the shortcut to the desktop of all users and then it will be available on the desktop to whomever is logged in. To do this, log in as administrator (or as a user with administrator priveledges) and then just move the folder with the shortcuts to c:\Documents and Settings\All Users\Desktop.

dknapp47
12-24-2006, 09:01 AM
Thanks for the quick response. I understand what you propose but that would require someone to actually be logged on to access the music and photos from the Tivo box. Also, if the person that is logged on logs off, it would kill the server (I think). I would like to have the server start up when the system boots up and keep running regardless of who logs on or off.

Thanks,
Dave

Sensei
01-04-2007, 05:12 PM
Well, that's an interesting one. I tried a couple of things out, and I'm afraid I don't have anything to offer in the way of a solution.

One thing I found out when looking into the original problem, is that when the TiVoNotify, TiVoTransfer, and TiVoServer services are "installed" they create registry entries in HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ Run. For whatever stupid reason, these entries just need to be there for these programs to run. These entries are created when the /install parameter is passed to the programs, and removed when the /uninstall parameter is used. (I found this out simply by trial-and-error; the command-line switches for these programs are not documented anywhere that I've found).

Note that these entries are in HKEY_CURRENT_USER, not in HKEY_LOCAL_MACHINE. I believe that is why a new instance is started when a user logs in -- these are startup programs per user.

So, that's what I know; I'm not sure if it's any help. The more I think about it, though, maybe the problem could be solved this way: remove the TiVoNotify, TiVoTransfer, and TiVoServer lines in the HKEY_USERS\...whatever... folders for all users on that computer (if they exist). Or maybe even simpler -- run TiVo Desktop batch file while logged in as each possible user -- when the batch file is finished, it clears those entries (for the "current user").

I don't know if the TiVo Desktop installer puts those entries there for each of the users explicitly, or what. But if the TiVo Server batch file works as you expect as a scheduled task, then maybe something like this might work. Question: under what user account is the TiVo Server batch file running as a scheduled task?

danschn
01-05-2007, 03:12 PM
I'm a regular user of the Tivo's ability to transfer files, so it's probably more appropriate that I leave the TivoServer and associated programs running all the time. I don't often start up Tivo Desktop though as I have set up autotransfers and only rarely add a new item to be transferred, and I delete files from My Tivo Recordings using windows commands.

Also, as often as not, Tivo Desktop just doesn't make it. The first time, after a re-boot of my PC, sure, but I tend to run the PC for weeks at a time without a reboot, and the Tivo Desktop just doesn't seem to take kindly to exiting and a later restart. The autotransfers (from Tivo to PC) and transfers to the Tivo generally work fine, even when Tivo Desktop is in unstartable. (Parenthetically, my Tivo will occasionally crash, and need a hard reset when it tries to transfer to the PC.)

My question is, can I use these batch files as a clean(er) way to stop and restart the Tivo executable files, that hopefully will cure what ails Tivo Desktop?

Thanks,
Dan

Sensei
01-09-2007, 09:20 PM
Hi danschn,

I suspect the answer would be "yes."

You can still use the "Start TiVo Server.bat" and "Stop TiVo Server.bat" files to start/stop the TiVo transfer stuff if it ever hiccups, without having to reboot your computer. But it seems the main hiccups you're seeing are by the TiVo Desktop application, so I think a modified batch file could help.

First, in the "Run TiVo Desktop.bat" file, right after this line:
"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /install /quiet
add this line:
"C:\Program Files\TiVo\Desktop\TiVoServer.exe" /start
(if you want to ensure TiVo Server is started as part of this process)

Then change this line:
"C:\Program Files\TiVo\Desktop\TiVoDesktop.exe"
to this:
start "C:\Program Files\TiVo\Desktop" TiVoDesktop.exe

Then, erase everything in the batch file after that.

This will launch TiVo Desktop, ensuring that all its dependencies are started (then even after you close TiVo Desktop, the other stuff will still be running -- so your auto-transfers should still run in the background)

I don't know for sure if this will solve your problem, it depends on what errors you are getting when you try to run TiVo Desktop. But from my tinkering around with it, this should hopefully give it as much of a kickstart as possible. If the errors you're getting are something like "blah blah not running" or "blah blah not installed as a service," then this should definitely help.

danschn
01-15-2007, 02:55 PM
Thanks Sensei - I'll try to implement. Usually the error I see is something like "the Desktop is taking longer to startup than expected. Do you want to continue?" I can say, but the message keeps coming up after the delay.

If I may pose further questions, from the Tivo when I initially installed the Desktop, I see "NewLoungePC" (the name for it on my home network), and the Tivo files on it. At some point, perhaps after a re-install, or a new version install, I started to see "NEWLOUNGEPC" as well. Sometimes the one with the small letters appears empty and sometimes it's a duplicate. Sometimes after Desktop has it's problems, the one with the small letters ("NewLoungePC") just goes away entirely until a reboot. My only problem with this behavior is I think I'm wasting PC resources. Any ideas?

As I look the Task Manager on my PC now, I've got 5 Tivo* images running: TivoBeacon, TivoDesktop, TivoNotify, TivoServer and TivoTransfer. The latter two seem to be relative memory hogs, right now grabbing about 20 M a piece, while essentially idling. Periodically, TivoServer goes nuts and goes over 100M, and starts grabbing 50% of the CPU and no one's using the Tivo or transferring files at the time. Maybe it's one of the subscriptions, like Heavy or CNET, but still it seems like there's a memory leak to me, and I end up killing the process and restarting mostly for my own satisfaction rather than experience a laboring PC.

I'm hoping the next version of things makes all this better.

Thanks for your help,

Dan

Sensei
01-17-2007, 08:15 PM
Hi danschn,

Seems like you've done a fair amount of digging for info on this yourself, as well. I haven't experienced the issue with multiple instances of a network computer in the Now Playing list, but then again I don't run the TiVo server very often. I see you've looked at the processes in task manager, and you don't see multiple instances of TiVoServer.exe running. Is it possible that there is more than one user logged into the computer? This is possible with Windows XP, but actually I don't know whether each user would get his/her own IP address in this scenario, and whether or not the TiVo would see multiple instances of TiVoServer running. Anyone else have any info on this?

Regarding the issue with the memory hogs, etc. -- that is one of the main reasons I created these batch files, so I don't have to worry about unused programs running in the background taking up processor time and memory (whether they're using a lot of it or not). This could be a memory leak, or it could just be that the TiVo server/desktop programs weren't written in a very memory-efficient or CPU-efficient manner.

And with the "taking longer than expected to startup" error, that's another one I haven't seen before. I suppose it is possible that doing a clean startup/shutdown of the TiVo processes (as my batch file attempts to do) could help with that; but honestly I'm not sure. Has anyone else experienced anything like that?

Q2112
07-17-2007, 08:53 PM
Hey did you ever find a solution?

The problem I have is I want the tivotransfer.exe and tivoserver.exe to be running all the time and to startup when I boot my xp machine. This way I will always have access to my shows on my PC.

I have created a start up batch file and it runs fine if I am logged in....but it does not start the servers as a scheduled task at startup. Also if I logoff then the servers die!!!

It seems the tivotransfer.exe requires you to be logged in.

Please help.