Welcome To Australia's No.1 Media Center Community!
You Are Currently Viewing As A Guest - you'll need to register in order to participate in our community and make this annoying message disappear!
By registering you'll be able to post & reply to questions, set up your own image gallery & blog, communicate privately with other members, create & respond to polls, access downloads and other "members only" features.
Registration is fast, simple and absolutely free so why not join our community today - you'll be glad you did!
For any problems with the registration process or your account, please contact support.
Hi guys,
I would like to know if someone has found a way to trigger the guide download automatically in Vista.
In MCE 2005 I was using Microsoft.Ehome.Epg.Helper.EhepgdatHelper class to trigger it.
But in Vista Microsoft kindly decided to do not give anymore access to this class.
Please note: Calling these APIs is totally unsupported and such APIs are subject to change from version to version.
However, with Type.InvokeMember() you can instantiate any object & call private methods - so you might want to give that a go.
Also I think there's some tools out there that change the download time (by editing a reg key - I think its called nextDownloadTime from memory). Changing the download time to (now+1min), is probably another way of programatically triggering a download. Note: in Vista, the mcupdate process will clobber your updated download time when it runs. But it would be unlikely that mcupdate clobbers the download time between now & (now+1min).
Cheers
Mike
__________________
This posting is provided "AS IS" with no warranties, and confers no rights.
Hi Mike,
thank you for your answer.
I tried the Type.InvokeMember technique as you suggested… it take me a while to made it work… and the technique works.
But the downloadEPG method raise an exception:
Eccezione non gestita: System.Reflection.TargetInvocationException: Eccezione generata dalla destinazione di una chiamata. ---> System.Runtime.InteropServices.COMException (0x80040202): Eccezione da HRESULT: 0x80040202 in System.Runtime.InteropServices.ComTypes.IConnectio nPoint.Advise(Object pUn
kSink, Int32& pdwCookie) in ehiProxy.IEhepgdatEvents_EventProvider.add_Ehepgda tConnectionStateUpdate(I
EhepgdatEvents_EhepgdatConnectionStateUpdateEventH andler A_1) in ehiProxy.EhEPGdatEventsMediatorClass.add_EhepgdatC onnectionStateUpdate(IEh
epgdatEvents_EhepgdatConnectionStateUpdateEventHan dler A_1) in Microsoft.Ehome.Epg.Helper.EhepgdatHelper.Establis hConnectionHelper.Connec
tEvent() in Microsoft.Ehome.Epg.Helper.EhepgdatHelper.AsyncOpe rationController.DoOpera
tion(Int32 maxWaitInMs) in Microsoft.Ehome.Epg.Helper.EhepgdatHelper.Establis hConnection()
--- Fine dell'analisi dello stack dell'eccezione interna ---
in System.RuntimeMethodHandle._InvokeMethodFast(Objec t target, Object[] argum
ents, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle
typeOwner)
in System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] argume
nts, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwn
er)
in System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisib
ilityChecks)
in System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invoke
Attr, Binder binder, Object[] parameters, CultureInfo culture)
in System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Bi
nder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers
, CultureInfo culture, String[] namedParams)
in System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder bind
er, Object target, Object[] args)
in EPGLoader.MainClass.Main(String[] args)
Have you any suggestion about what is causing this problem?
Regards
mmutti
Last edited by mmutti; 7th November 2007 at 06:35 AM.
Reason: Typos
Sorry, I dont. All I can suggest is changing the download time.
Search for "How to set the time the EPG (Program Guide) downloads" for a post on how to change the download time.
Or you could try out one of the freeware apps that does this (e.g http://www.avsoft.nl/Tools/guidedltime/)
Cheers
Mike
__________________
This posting is provided "AS IS" with no warranties, and confers no rights.
I haven't found as nice a way to do it in Vista as we could in MCE 2005 using Microsoft.Ehome.Epg.Helper.EhepgdatHelper.Download Epg() but there's a clunkier way to force an immediate Guide update in Vista by writing code to do the following:
1. Delete the value "dlLastTime" in Registry Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Cur rentVersion\Media Center\Service\EPG".
2. Run the MCUPDATE task (%SystemRoot%\eHome\mcupdate.exe)
The following Member(s) said "Thank You!" to justlynden for this information:
I haven't found as nice a way to do it in Vista as we could in MCE 2005 using Microsoft.Ehome.Epg.Helper.EhepgdatHelper.Download Epg() but there's a clunkier way to force an immediate Guide update in Vista by writing code to do the following:
1. Delete the value "dlLastTime" in Registry Key "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Cur rentVersion\Media Center\Service\EPG".
2. Run the MCUPDATE task (%SystemRoot%\eHome\mcupdate.exe)
Hmm that didn't seem to work for me, do you know if the Media Center has to be expecting guide data to come in for this to work? I tried your fix directly after doing a "Get Latest Guide Listings" I also noticed MCUpdate-Next there with what looks like some sort of binary date could this be part of the puzzle?
Well tried deleting that reg entry also and nothing happened then either, the values don't get recreated until I manually select "Get Latest Guide Listings" from within Media Center.
Last edited by avatar1976; 2nd August 2008 at 09:10 AM.
Reason: Further information.
It will work as long as you use elevated rights. Right click Run as administrator
Or make it permanent by going into the properties box and select the advanced tab. (Permanent is best option)
Make sure your Command Prompt dos box looks like this.
Delete "dlLastTime"
Then copy and past this command into the dos box.
%SystemRoot%\eHome\mcupdate.exe
Then hit enter.
Quote:
Originally Posted by avatar1976
I also noticed MCUpdate-Next there with what looks like some sort of binary date could this be part of the puzzle?
This link goes into explanation about the binary you’re looking at in the dlLastTime entry. Decoding the schedule By Cowboy At The Green Button.
Bryce
The following Member(s) said "Thank You!" to Bryce for this information:
It has been a long time since I looked at the ins and outs of this as it has been running twice a day flawlessly for me for many months.
What Bryce says is probably correct, as my scheduled guide download/update does run under an account with administrative priviledges.
From memory, it also doesn't work if you set your guide download options in VMCE to "Run Manually" rather than "Download when Connected", and I have a vague memory that perhaps it doesn't update the guide again if you've only just updated it manually as you mentioned.
Personally, I have the mcupdate scheduled task disabled, have the guide download options in VMCE set to "Download when Connected", have a morning and evening scheduled task which runs my guide update then deletes the registry key and launches mcupdate.exe. The scheduled task runs under the same user account that the media center runs as and this is an account with admin priviledges. I then use file system permissions to restrict access to files and folders for that account so that whoever is using the Media Center can't delete or modify any files I don't want them to.
The following Member(s) said "Thank You!" to justlynden for this information:
Hi avatar1976,
Personally, I have the mcupdate scheduled task disabled, have the guide download options in VMCE set to "Download when Connected", have a morning and evening scheduled task which runs my guide update then deletes the registry key and launches mcupdate.exe. The scheduled task runs under the same user account that the media center runs as and this is an account with admin priviledges. I then use file system permissions to restrict access to files and folders for that account so that whoever is using the Media Center can't delete or modify any files I don't want them to.
So could I potentially put this on the back of my BladeRunnerPro 3.0 task? As a postprocess task for example? I have my scheduled task for bladerunner set to run with highest privilages. How did you go about deleting a reg value in a script though? Did you just merge a reg hack with that entry blank or did you figure out a way to delete the actual value out of the key?
I don't use BladeRunner or any third party software for my EPG. I wrote my own and its this code that writes the registry and runs mceupdate after updating the guide.
I can give you an executable that I wrote for when I want to manually force a guide update if you want. This could be used as a post-process task with Bladerunner.
The following Member(s) said "Thank You!" to justlynden for this information:
I use this code within a batch file when using epgStreams wmcGuideServiceProxy.
It deletes the reg value first. Then triggers a guide download.
The reg value returns after the download has finished.
Trigger guide.bat
Code:
cls
cd\
c:
REG.exe DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\Media Center\Service\EPG" /v dllasttime /f
%SystemRoot%\eHome\mcupdate.exe
For %%c in (Cls Exit) do %%c
Bryce
The following Member(s) said "Thank You!" to Bryce for this information:
Thanks for the replies there guys, Justlynden, I'd be happy to try out yout code and Bryce thanks for the reply there that will work great also. Always good to have a couple of ways of doing things incase one stops working.
Confirmed it definitely works I just had to not download for a few hours, it then quite happily downloaded the latest guide information out BladeRunnerPro 3.0 after deleting the key and calling the mcupdate command.