Share via


Position Changer Add-In updated for Media Center in Windows Vista

Back in early 2005, I wrote an article for MSDN on implementing add-ins for Windows XP Media Center Edition 2005.  As part of that article, I implemented an add-in that made it easy to jump around in a recorded TV show, video, or music file using the remote control, simply by entering a time code using the remote control's number buttons.  In October of 2005, I updated the add-in for Update Rollup 2.  Now that Windows Vista is out, I've updated it again for Windows Vista, and the new version is now available for download.

If you have User Account Control (UAC) enabled, follow the following steps to install the add-in (if you don't, just run the MSI):
1) Open a command prompt with "Run as administrator"
2) Run "msiexec /i pathtoaddin.msi", where pathtoaddin.msi is, you guessed it, the path to the add-in MSI.

Note that I removed a bit of functionality for this release, specifically the bookmarking functionality, as it interferes with the new mini-guide available in Vista.

As described in the article, using the add-in is pretty straightforward.  While viewing or listening to media, press the right arrow on the remote or keyboard.  Then enter the time you want to jump to (123 for 1 minute 23 seconds, 1053 for 10 minutes 53 seconds, etc.) and press enter.  Pressing the left arrow instead of the right arrow makes the jumps relative instead of absolute.

I hope this is useful to you.

Steve

PositionChangerAddIn_Vista.zip

Comments

  • Anonymous
    January 03, 2007
    Thanks for the update. -Olcay

  • Anonymous
    January 04, 2007
    In the mce 2005 version, you were able to get the file name from the graph that mce publishes.  Were you able to make that work in vista?

  • Anonymous
    January 04, 2007
    The comment has been removed

  • Anonymous
    January 04, 2007
    Thanks for the update!  Will the source for the updated version be made available? Or did I miss it somewhere?

  • Anonymous
    January 04, 2007
    Definitely.  Just haven't had the time to package it all up yet... hopefully will soon.

  • Anonymous
    January 05, 2007
    Awesome!  Thanks a lot Stephen.  This is a must have for Media Center...

  • Anonymous
    January 05, 2007
    Does this version work on MCE 2005 also or do I need to keep that old MSI laying around?

  • Anonymous
    January 06, 2007
    Will this program work on extenders such as the XBOX360?

  • Anonymous
    January 06, 2007
    Brad, thanks, glad you like it! Vern, this version is Vista specific, simply because I updated it to rely on the new add-in hosting APIs.  I didn't have to do that, since Media Center in Vista supports add-ins written with the deprecated APIs, but when I release the code I want people to be able to compare the two versions to see the changes I made. Dave, this should work fine on the 360, but make sure that when you install it, you select to install it for all users rather than for just you.

  • Anonymous
    January 06, 2007
    In RC2 (I haven't looked in RTM), the graph was still published, but I wasn't able to cast the filters into anything useful.  Someone over at the MCE Sandbox was able to extract useful information from them though.

  • Anonymous
    January 06, 2007
    I have it on good authority that this was removed for RTM, but if you can show otherwise, I'd be interested in seeing it.

  • Anonymous
    January 06, 2007
    I'll take your word for it, I figured out another way to accomplish the same thing so I haven't needed to try it in RTM.  Only downside is that it requires admin rights, but that's easy enough to push into another process and use a mechanism like named pipes or com+ to communicate the info back.

  • Anonymous
    January 06, 2007
    Cool. Out of curiosity, what is the other mechanism you discovered?

  • Anonymous
    January 06, 2007
    "Discovered" is generous :) I made the assumption that each instance of ehshell can only playback one file at a time, and in order to play a file it would have to have a handle on the file.  So I used NtQuerySystemInformation to get a list of all the files ehshell has open, in my case I'm only interested in dvr-ms files so it's pretty easy to filter. It's a lot less elegant than the method you used, but it's also much less likely to go away in the future.

  • Anonymous
    January 06, 2007
    Hi Stephen, do you know another way to retrieve the filter graph from vista mce ? The managed object model does not provide an access to the graph, and now that MCE no longer publishes the graph into the ROT, I guess that we are stuck... Thanks Albain

  • Anonymous
    January 07, 2007
    There may be another way, but I am not sure about the stability : FFDShow is able to publish the graph into the ROT (there is a registry key in ffdshow settings to enable this). So if you are using ffdshow with this setting or if one could create a generic directshow filter that does nothing else than publishing the graph into the running object table (I don't know if it is possible)...

  • Anonymous
    January 07, 2007
    Even when WMC was publishing the graph (in RC2), it was doing something to the filters so they couldn't be cast into their proper interfaces.

  • Anonymous
    January 09, 2007
    I finally found what the problem was ! My SDK was still recent but not enough. I recovered the last version of graphedit, including the last version of proppage.dll and this is it : you have to register it with regsvr32, and all the missing interfaces are back : IGraphbuilder. Of course, it does not solve the issue with the non-publishing of the graph into the ROT by WMC...

  • Anonymous
    January 10, 2007
    The comment has been removed

  • Anonymous
    January 10, 2007
    I'll test it out again tonight on my 360 and let you know what I find.

  • Anonymous
    January 10, 2007
    Any chance that there is a way to simply use FF and RW when playing music?  Seems like you've tapped into something way more powerful, but just a simple FF and RW on MP3's in MCE would be great. Thanks!

  • Anonymous
    January 10, 2007
    Hi Craig- I'm not sure I understand the question... are you asking if it's possible to just fast-forward and rewind when playing music in MCE?  I've never had trouble doing so, although all of my music is in WMA format and it sounds like yours is in MP3; maybe that makes a difference?  I can try it when I get home tonight (stuck at work due to the traffic resulting from the snow here in the Seattle area).

  • Anonymous
    January 10, 2007
    The comment has been removed

  • Anonymous
    January 10, 2007
    Hi Stephen, It has been a while I am working on this issue : when I register a graph into the Running Object Table and then unregister it correctly (I can see the graph appearing and then disappearing in graphedit / Connect to remote graph), the graph won't unload after ending the media. When WMC registered its graph (in WMCE2005), it was correctly unloaded, so what can be the difference here ? I am using WMC in Vista, and the graph is registered and unregistered into the ROT through a running filter (ffdshow). I also tried to unregister the graph before stopping the video, but still the same. Thank you for your help Albain

  • Anonymous
    January 11, 2007
    OK I got it : the graph has to be unregistered before the graph would unload otherwise it won't work. Besides all the access must be cleaned (filters, graph...)

  • Anonymous
    January 13, 2007
    I have installed this on a Vist 64 RTM computer and it doesn't seem to work. Is this a x86 only Visat MCE plugin?

  • Anonymous
    January 13, 2007
    The comment has been removed

  • Anonymous
    February 07, 2007
    Hi Stephen, I have tried to implement the same keyboard hook as you did, and it working, but only for simple keys : arrows and numbers only. Play/pause, fast forward key... and all the keys with "control" and/or "shift" in it are not caught. Do you know why ? You can visit my website to see the plugin I have made, everything is working except the remote. Thank you for your help Damien

  • Anonymous
    February 07, 2007
    Forgot the url of my website : http://damienbt.free.fr

  • Anonymous
    February 08, 2007
    The comment has been removed

  • Anonymous
    February 08, 2007
    Thanks for your answer, I will have a look at those

  • Anonymous
    February 09, 2007
    I don't think it is possible to use your first method, by overriding Wndproc in a Form (or Nativeform) : now addins are loaded into separate process (ehexhost.exe), so assigning the same handle as the ehshell main window does not work. I tried to register the remote using the RegisterRawInputDevices in a separate app, and I do receive the remote control commands...as long as I have the focus. If the focus is on media center I don't receive commands anymore. If you have an idea, I would really appreciate your feedback :-) Thanks

  • Anonymous
    February 14, 2007
    I've been playing around some with the source trying to get this to work with my 360 on Vista.  Has anybody figured out how to get the number keys recognized?   Using the low level keyboard hook, the left/right/up/down commands come in fine, but numbers come back as Keys.Packet and the actual code doesn't appear to be encoded in the wparam or lparam. Thanks

  • Anonymous
    February 21, 2007
    any chance this could be enhanced to include a set skip?  something like hitting the left key for an incremental skip but then map it to the up or down arrow and set a value (say 15 mins) and be able to skip in 15 min chunks?  My cable dvr has a 15 min skip and its pretty useful for skipping through a file w/o having to know the exact position you are looking for. not that its a huge issue now but its alot of button presses to mimick this functionality (left arrow and then 1 5 0 0) and you have to do that each time to skip 15 mins.  (this is mainly useful for movies since there arent chapter's on recorded movies or even those ripped to wmv)

  • Anonymous
    February 21, 2007
    The code could certainly be updated to include functionality like that, sure.  It would just be a matter of adding another if/else condition to the hook_KeyDown method.  The code would get a TimeSpan for whatever length of time you wanted (either hardcoded or pulled from some configuration settings) and would do something like this:  TimeSpan time = TimeSpan.FromMinutes(15);  TransitionToTime(time);  ClearInputAndResetTimer();  DisplayPosition();

  • Anonymous
    March 13, 2007
    Humperdink, I just updated the code so that it does in fact work with the 360 (just tested it).  I'll have that up on my blog and on MSDN shortly (hopefully).

  • Anonymous
    March 14, 2007
    I've updated the source so it should now work with an Xbox 360 extender (at least it does with mine).  Haven't created a new installer yet.  Hope that helps!

  • Anonymous
    March 17, 2007
    Seems like the .msi installer has disappeared, only the source code is in the zip. Where can I get the msi for Visa??

  • Anonymous
    March 17, 2007
    Zeev, see my previous comment, specifically the second sentence: "I've updated the source so it should now work with an Xbox 360 extender (at least it does with mine).  Haven't created a new installer yet." So there isn't an MSI right now.  For now you can manually use gacutil.exe and RegisterMceApp.exe.

  • Anonymous
    March 17, 2007
    Very cool Stephen, works well. http://unmitigatedrisk.com/archive/2007/03/17/38.aspx

  • Anonymous
    March 17, 2007
    Thanks for your reply. Given I'm a U*nix person, can you please elaborate on the use of gacutil.exe and RegisterMceApp.exe to enable me to install the Addin on my Vista MC? Thanks.

  • Anonymous
    March 18, 2007
    Hi Zeev- If you have the .NET Framework SDK installed, you'll have gacutil.exe (you can also just copy it from a machine that has the .NET 2.0 SDK).  If you have it, you just do:    gacutil.exe -i DllPath to install the assembly into the GAC (see the docs for more info if you like).  Once it's in the GAC, you register it with Media Center, with the RegisterMceApp tool in %windir%ehome:    RegisterMceApp /allusers XmlRegFile where the XmlRegFile is the .xml file I included with source and binaries. If you don't have the .NET Framework SDK, Ryan Hurst has posted directions for how to install it without gacutil: http://unmitigatedrisk.com/archive/2007/03/17/38.aspx I'll try to create an MSI shortly, but in the meantime, that should work.

  • Anonymous
    March 29, 2007
    Any eta on a possible msi for this. It would be incredibly useful for me. I have never used .net SDK, so I tried Ryan Hurst's method. Well after running through the Vista permissions maze for over an hour, I finally found it easier to teach myslf how to use the gacutil. I followed the steps and was told they were successful on both counts. I am now in MCE, but when I push my right arrow I get nothing.

  • Anonymous
    March 29, 2007
    Okay, so I wasn't pushing enter after right arrow/time ahead. DUH! Thank you very much for this great add-in!

  • Anonymous
    July 11, 2007
    The comment has been removed

  • Anonymous
    July 12, 2007
    Thanks, glad you like it!  Unfortunately, adding visuals given what's currently available would be pretty tough; not necessarily impossible, but I guarantee there would be quite a bit of hackery involved.

  • Anonymous
    September 24, 2007
    Hi, This is exactly what I've been looking for, but I can't find a MSI file in the zip file in the link at the top of the page. Just lots of source files by the look of it. How do I install it? Steve.

  • Anonymous
    September 30, 2007
    .msi installer is missing in the zip

  • Anonymous
    February 11, 2008
    The MSI file seems to be missing from the zip package for me as well. All I see is source code. What program do I need to use to compile this?

  • Anonymous
    July 29, 2008
    Toub, still no MSI file in the zipped package. Any chance you can fix that? I'm dying to be able to skip ahead. Thank you!

  • Anonymous
    August 05, 2008
    Same demande ! I tried to install it with gacutil, I followed all the instructions, evrything was OK. But it still doesn't work. I really need the MSi file. Pleeeease ! Thank you (sory for the mistakes, I'm french !)

  • Anonymous
    September 17, 2008
    Hi there, This worked for me on my Vista pc. Then I've upgraded to Vista SP1 and also installed the TV Pack. And now I can't get this to work. How can I unregister the xml and the dll to stert over again please? Alternatively an MSI would be great please.

  • Anonymous
    October 29, 2008
    Yea, I could not get it to work with the TV pack either. It works perfect without the TV pack. Shame really, the TV pack finally fixed the errors with channel changing and different resolutions. I would gladly pay for this utility.

  • Anonymous
    November 03, 2008
    I can confirm - this doesnt work with the TV pack installed. Is there a workaround for this?

  • Anonymous
    December 26, 2008
    I too failed to get this working after installing TV Pack. I unregistered using the /u option but still can't get it to work again. Any help here is greatly appreciated.

  • Anonymous
    January 04, 2009
    I am having problems getting this plug-in to work with vista home premium 64-bit.  I have installed it using the following instructions. Copy the contents of the debug folder to Program FilesMCEPosition Changer Add-In Open a command window with administrative privliges cd windowsehome fsutil hardlink create PositionChangerAddIn.dll "Program FilesMCEPosition Changer Add-InPositionChangerAddIn.dll" cd "Program FilesMCEPosition Changer Add-In" "windowsehomeRegisterMCEApp.exe" /allusers "PositionChangerAddInReg.xml" Restart all of your Media Center Sessions... I have installed it using the program files folder and the program files (x86) folder.  I don't have the TV Pack installed.  thanks for any help.  

  • Anonymous
    March 05, 2009
    The download of the PositionChangerAddIn no longer works, I get a 404 error on the url http://toub.members.winisp.net/Code/PositionChangerAddIn_Vista.zip. I'm interested in the nice plug-in. Will the plug-in be back later?

  • Anonymous
    March 07, 2009
    PLEASE PLEASE PLEASE make this available for download again. I just upgraded my HTPC to Vista and the one thing I am missing is this! I had it for XP and I thought it was the greatest thing ever! Please put the file back up for download somewhere or if you dont want to, I will host it for you if you would like, just email me - tprendergast311@yahoo.com. Thanks!

  • Anonymous
    March 08, 2009
    I'm glad you enjoyed it.  It's attached to this post: http://blogs.msdn.com/toub/attachment/1409370.ashx

  • Anonymous
    March 09, 2009
    Thanks so much for the quick response but there doesn't seem to be an .msi file in this zip as mentioned in your instructions. Does this need to be compiled or something? Not to sound like a complete idiot, but I have no idea how to do that if that is the case. Let me know the easiest way for me to install. Thanks again!

  • Anonymous
    March 10, 2009
    Hi Tom- See the comments above for explanation and directions: http://blogs.msdn.com/toub/archive/2007/01/03/position-changer-add-in-updated-for-windows-vista.aspx#1902463 and http://blogs.msdn.com/toub/archive/2007/01/03/position-changer-add-in-updated-for-windows-vista.aspx#1908274 I never got around to creating a new MSI. Thanks.

  • Anonymous
    March 11, 2009
    Okay that was really easy, worked like a charm. Thanks so much!

  • Anonymous
    March 26, 2009
    Hi Stephen; Many thanks for the great add-in's! I can't seem to find the version for MCE 2005. I'd like to have the original 'full featured' one for 2005 - any chance you can post a link? Thanks!

  • Anonymous
    March 26, 2009
    Try http://blogs.msdn.com/toub/attachment/481082.ashx

  • Anonymous
    April 29, 2009
    Hi Stephen, Any way you can make this great add-in to work with TVPack? I am missing this feature so much. Thanks

  • Anonymous
    April 30, 2009
    Hi Matt- I haven't tried out the TVPack, and most likely I won't have the time to do such an update.  If I do, however, I'll certainly post about it.  Thanks for the interest.

  • Anonymous
    June 19, 2009
    Thanks Steve. Just so you know, even though this add-in doesn't work with Vista with TVPack, it apparently works with Windows 7. Great product. Thanks again.

  • Anonymous
    August 10, 2009
    Hi Matt, have you actually tried in windows 7? I can't get it to work. I can't believe microsoft didn't impliment something like this as standard for Media center.

  • Anonymous
    August 26, 2009
    Just for internest sake working on Windows 7 RTM - no problem what so ever

  • Anonymous
    January 27, 2010
    Isn't this already in Win7?? Just enter a number and hit either the FF/RW or Back/Fwd button to skip.