Windows Entertainment and Connected Home

How to organize, access and enjoy all of your media in and around your home

How to set the time the EPG (Program Guide) downloads

  • rated by 0 users
  • This post has 11 Replies |
  • 1 Follower
Page 1 of 1 (12 items)
  •  

    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!!!
  •  

    Holy Mackerel! That's a truly brilliant piece of detective work, Cowboy. The issue of EPG download time has come up repeatedly but has never before been answered satisfactorily. Many, many thanks for figuring this out!

    Petros

  •  

    Well I'll be!!! At 4:00 PM MST my computer woke up and downloaded the EPG. So it actually works!!

     

    Go Griz!!!
  •  

    Hi Cowboy -

    Just wanted to say thank you for this detailed work.  I used your info to re-program my EPG to download at 1:30am daily.  It works like the proverbial charm.  Great analysis and clear write-up.

    Regards,
    - Supra-TT

    Intel Core 2 Extreme quad core 2.93GHz-8M/Intel S975XBX2 "Bad Axe II"/Corsair 2GB DDR2-800/Nvidia 8800GT XXX PCI-E/Dual AverMedia M780 Combo HDTV/Seagate Barracuda ES2 1.0TB SATA RAID/Sony DRU-710A DVD-RW/XBOX 360 as Media Center Extender
  •  

    Hi Cowboy,

    Also many thanks from me for your excellent and thorough investigation. I have written a small tool around this which will hopefully assist others. See a small description below. Thanks again!

    riesm.

    How does it work?

    1. Download the EPG_ChangeDownloadTime.zip and extract it to your desktop
       
    2. Double-click the file EPG_ChangeDownloadTime.exe

       
    3.  The main screen will start and looks like this:

       
    4. In the left top corner you will notice the last time the guide was downloaded
    5. Now set the preferred time by changing the hour and minute indicator and click "Set"
    6. A message box will show that the new time was set. It also indicates that you need to restart the computer to take the new settings into effect!
    7. Quit the application and then restart the computer.

    Check if it worked

    To check the change (after you have restarted the computer), you can start up the event viewer (Click Start / Run... and enter "eventvwr" and click OK). In the Application Log you will find an entry from the "Media Center Scheduler", double-clicking that entry will show you the time the next download will occur:

    Why do I need to restart?

    The media center scheduler is an active process and will only read the new download time from the registry when it starts up. The easiest way to do so, is by restarting the system. The other way (expert users only) is to kill the "ehSched.exe" process and start Media Center (starting MCE will restart ehSched.exe as well).

    Thanks To

    Many thanks go to Cowboy for his excellent article on guide download time published at the greenbutton website at http://www.thegreenbutton.com/community/shwmessage.aspx?forumid=42&messageid=80831. I have written this small tool to accommodate people who don't want to mess with the registry.

  •  
    Great information. The utility is a godsend.
    Now I don't have to be disrupted at 5:24am by the PC firing up from Hibernation.

    Good work guys. 2 thumbs up!
  •  
    FREAKIN AWESOME!!!!   I've been racking the web looking for this - my PC is in my bedroom and it wakes up at 2 am!  I just turned off the automatic guide download because I couldn't figure out how to change it.
  •  
    Ok, i don't mind my computer wakes up in the middle of the night to download the EPG, but why does it not go back to sleep after the download ??
  •  
    For this, you would need to go into your power settings and set up your computer to go into timed standby.

    rasta
    Media Box - Lian Li V880, OCZ ModStream 450, Intel G41RQ, Core Duo E4700, 4 GB GSkill PC2-6400, Hauppauge HVR-1600, Sapphire HD4670 HDMI, Toshiba 26HF85 HDTV, Hitachi 80 GB SATA (O/S), Home Grown 2TB WHS (Storage)
  •  
    riesm:

    Hi Cowboy,

    Also many thanks from me for your excellent and thorough investigation. I have written a small tool around this which will hopefully assist others



    This app causes a security policy violation, and I could not get it to work.

    FYI.

    rasta
    Media Box - Lian Li V880, OCZ ModStream 450, Intel G41RQ, Core Duo E4700, 4 GB GSkill PC2-6400, Hauppauge HVR-1600, Sapphire HD4670 HDMI, Toshiba 26HF85 HDTV, Hitachi 80 GB SATA (O/S), Home Grown 2TB WHS (Storage)
  •  
    Nice work cowboy!

    That was impressive, now I can have my guide updated when I want. Amazing that you have to go through all of that just to change the time EPG updates.

    Snaphappy
  •  

    Scheduled Guide download not working.  

    Hi Gents,

    I was able to change the time of download but I wont download for a reason I don't know... Please help!

    I would need your help to resolve my little issue.  I have scheduled an automatic guide download at 4:00 AM.  When comes the time to download, the machine wakes-up up from it sleep state but don't download.  I can see in the event viewer that their some activities at 4:00 for about 40 secconds and then standby again.

    I tought it was a weak signal from my WIFI card but I remove it and hard wired from my router to my onboard LAN.  It didn't made any difference.

    I can download the guide manually no problem. I can access the internet no problem

    Please help!

    System

    Athlon 3200+

    1 Gig Ram

    MSI K8NGM2-FID

    250 Gig HDD

    MCE 2005 Service pack 2 updated to the bone!

    No antivirus, no 3th party firewall

     

    Thank you

     

    Charles

Page 1 of 1 (12 items)