Decoding the schedule.
Media Center stores the last time the download ran and the next time it will run in the registry.
The 2 entries in the registry that contain these values are respectively:
\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\EPG\dlLastTime
\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Media Center\Service\EPG\dlRegTime
The values that are stored in the registry are the number of 100ns intervals that have elapsed since January 1, 1601. Since these values are manipulated in registers by the program using load and store commands, they are stored in the registry backwards.
In order to determine what actual local time values the entries represent I find it easiest to use the Windows time program, W32tm. This program is already on every Windows XP system, and will convert NT Time Epoch (NTTE) decimal values to GMT and local time. The format for this command is: w32tm /ntte <time value in decimal>. Of course the values are stored in hexadecimal so we need to use the calculator in accessories. Bring up the calculator, select scientific mode, hexadecimal, and enter the value from the registry backwards in 1 byte increments. The following are examples based on my system.
Example 1.
The value is dllasttime is a6 4f 6c b6 70 dd c4 01, so enter 1c4dd70b66c4fa6 into the calculator. Click decimal and you will get 127470165639843750. At the command prompt run w32tm /ntte 127470165639843750 and you will get:
C:\Documents and Settings\UserName>w32tm /ntte 127470165639843
147534 21:56:03.9843750 - 12/8/2004 14:56:03 (local time)
So the last time the guide downloaded was 14:56:03 local time, which equates to 21:56:03 GMT, a 7 hour difference in my area (MST). Neat huh? Keep reading...
Example 2.
Following the above procedure but using dlregtime I take the value from the registry which in my case is 2d 85 2c 34 ff dd c4 01, I enter 1C4DDFF342C852D into the calculator, click decimal and get 127470777634948397. At the command prompt I run w32tm /ntte 127470777634948397 and get:
C:\Documents and Settings\UserName>w32tm /ntte 127470777634948397
147535 14:56:03.4948397 - 12/9/2004 07:56:03 (local time)
Wait a minute! It should say 14:56:03 local time, but it says 14:56:03 GMT. That's not right. If I go into the event viewer and look in the Application log for the entry "Media Center Scheduler" I see:
The next scheduled download of the latest television listings guide (EPG) is 12/9/2004 14:56:3.
That's the GMT time indicated in example 2, but now it shows as the local time the next download is scheduled. Is this some Microsoft trick to distribute the download times more evenly. You would think that the time zones themselves would take care of that. In any event, I want my computer to come out of standby at 16:00 hours (4 PM MST) and it is now scheduled for 14:56:03. I need to add 1 hour, 3 minutes and 57 seconds, or 3,837 seconds. In NTTE values that's 38370000000. So I add 38370000000 to 127470777634948397 and get 127470816004948397. Run w32tm and get:
C:\Documents and Settings\UserName>w32tm /ntte 127470816004948397
147535 16:00:00.4948397 - 12/9/2004 09:00:00 (local time)
Darn, I have 4948397 extra 100ns units or .49 seconds extra. GOT to get rid of that so I subtract 4948397 from 127470816004948397 and get 127470816000000000. Now when I run w32tm I get:
C:\Documents and Settings\UserName>w32tm /ntte 127470816000000000
147535 16:00:00.0000000 - 12/9/2004 09:00:00 (local time)
Whew!! That's better. Now lets convert that to hex, 1C4DE0822E8C000, enter that into the registry key dlregtime as 00 C0 E8 22 08 DE C4 01. Done. Now lets reboot the computer and see what it says in the event log about the next scheduled download time.
The next scheduled download of the latest television listings guide (EPG) is 12/9/2004 16:0:0.
Now all I have to do is wait to see if this works.
Go Griz!!!