[DISCUSSION] Patch WMC to run on Windows 10 final & possible alternatives

Discussion in 'Windows 10' started by ricktendo64, May 8, 2015.

  1. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    Yes, forgot to mention it, it's only working when run as administrator, need to check what's the cause.

     
  2. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    Wait today will be uploading a new version with multi-language support and just install the newer version don't need to uninstall.

     
  3. LRo

    LRo MDL Novice

    Sep 24, 2016
    7
    0
    0
    #9143 LRo, Apr 11, 2019
    Last edited: Apr 12, 2019
    Today I have tried fullscreen mode again after a long time: It worked for a while and eaven channel switching worked. But in the end it was frozen again and I went back to opening in a window.
    There is no solution yet, or do you hav a solution in the meantime?

    And I have to thank you all making it still possible to use WMC. It is a life saver for me, cause of the high WAF (women accetance factor). So many, many thanks!!!

    at xxx.thegreenbutton.tv/forums/viewtopic.php?f=97&t=11402&start=40 I found the solution myself:
    Actually found the solution, you were close but this is the full solution:
    * Crudely copy the entire "C:\Windows\ehome" folder to "C:\Program Files\ehome", enable the "Disable full screen optimization" flag on "C:\Program Files\ehome\ehshell.exe", and finally make sure that the desktop start shortcut points to "C:\Program Files\ehome\ehshell.exe".


    Now media center runs full screen again.

    One problem: I use a remote control with imon Software. The four quci buttons for showing the programms (EPG), Live View, etc. are not working. when I press the button the screen turns black and after 5 seconds return to the previous view.
     
  4. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    Copy the below contents to reg file, save and import the registry file.

    Code:
    Windows Registry Editor Version 5.00
    
    ; Run Windows Media Center as Administrator with Fullscreen Optimization Disabled.
    [HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
    "C:\\Windows\\ehome\\ehshell.exe"="~ DISABLEDXMAXIMIZEDWINDOWEDMODE RUNASADMIN"
    
    [HKEY_USERS\.DEFAULT\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers]
    "C:\\Windows\\ehome\\ehshell.exe"="~ DISABLEDXMAXIMIZEDWINDOWEDMODE RUNASADMIN"
    
    The current version of my WMC installer contains these fixes.

     
  5. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    Updated my WMC Installer to v1.0.216.0.

    The file is getting uploaded and will be availalbe in due time at the same link.
     
  6. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    129
    98
    10
    @crusin unfortunately, issues with the next major version of Windows 10 are to be expected.

    Paul Botos has identified an issue that may be related to the one you're experiencing: kevinchalet.com/2018/10/07/highway-to-dll-hell/#comment-4351451780
    Would you mind giving the proposed workaround a try?
     
  7. Bigal

    Bigal MDL Member

    Mar 4, 2011
    238
    13
    10
    @MSMG
    did the kb4493509 update fix the FontLink errors and therefore negate having to remove the reg entries?
    I see reference to x86 and amd64 in the start.cmd, is this now for both x86 and x64, if so, great, as i have an old x86 pc that i would love to use this on.
    Is the green / blue option still available?
    Any more info on how to integrate it into an iso, LTSC, win10 1809, win10 1903, ect?

    @Kévin Chalet
    nice fix, i did wonder why after first installing of 8.8.2 there was no red button in the Windows task bar when TV programs are being recorded, it does eventually show up, along with the green wmc icon showing guide date but it is sporadic at best.

    Has this been tested with 1903?
    Loving the work guys.

    Is there anyway someone can do a black version as well as the blue and green version?
    Can j.c.f. launcher 6.0.2 be included, with his permission, so WMC can be launched not full screen?
     
  8. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    129
    98
    10
    In some cases, the WMC Systray (aka ehtray) will try to avoid displaying an icon if it doesn't have to inform the user (e.g that the guide was updated or that a recording issue is happening). It's not really new and not specific to Windows 10: as long as it correctly shows up when recording a TV program, I think we can say it works properly :D

    I haven't tested it yet, but as mentioned in my previous message, a few reports seem to indicate that there's a bug causing WMC to crash when doing things like browsing the EPG.

    Luckily, it shouldn't be too hard to work around it ; likely, by embedding a copy of CPFilters.dll in our package, like I did in 8.8.2 to work around a breaking change in MSVidCtl.dll: kevinchalet.com/2018/10/07/highway-to-dll-hell/

    I recently spent some time fixing the excellent Media Center Studio to make it work on Windows 10.
    AFAIK, sources have never been open sourced by the original developer, but since it's a fairly simple .NET application, we can easily tweak it and fix bugs, even without the original source code.

    Depending on the interest, it's certainly something we could share publicly.
     
  9. mark frankland

    mark frankland MDL Novice

    Apr 9, 2019
    15
    0
    0
    #9150 mark frankland, Apr 11, 2019
    Last edited: Apr 12, 2019
    I haven't took the plunge to upgrade to Windows 10 yet because I defo need WMC to work. I have been reading evey day this thread and another on another site. Does Media Center Studio work with windows 10 as I need that also. I use DVBLink and need that to also work.
     
  10. Gareth North

    Gareth North MDL Junior Member

    Jan 27, 2016
    68
    21
    0
    Hi Kevin,

    Yes it is great to see people still using Media Center and overcoming the obstacles of bringing it to the latest builds of windows 10.

    Thanks for your time and energy into producing the 8.8.2 installer in the past and continuing to update it. I looked at your blog but despite a career in IT I'm not a programming wizard and don't understand software repackaging changes. I have something I have been meaning to ask you for a while though....

    I have tried the 8.8.2 installer on 1809 without success. It installs fine and seems to work in every regard but when clicking on a channel to play livetv nothing happens no loading circle going round nothing. I was posting about this problem a few pages ago. So my journey with Media Center so far has stopped at 1803 using the 8.8.1 installer and making the changes as regards EncDec.dll and MSVidCtl.dll manually.

    The reason its not worked ever for me as opposed to other users on 1809 using it is because I'm using the excellent DVBLink software that adds virtual tuners into Media Center. I did try the 8.8.2 installer multiple times by the way on multiple vanilla builds of 1809 each time with DVBLink virtual tuner and It would scan channels via the virtual tuners and I could populate a guide but clicking on a channel I could not watch livetv. These are free to air non DRM channels by the way and I'm based in the UK.

    I notice in your last post you mention that you not only altered EncDec.dll and MSVidCtl.dll in the 8.82. installer but you mention you also altered CPFilters.dll. Could possibly this be the reason why 1809 + 8.8.2 + DVBLink has never worked for me yet? Is there a way I can return the CPFilters.dll file or any other file to how it was previous that you might of altered that might start live tv via DVBLink virtual tuners working again using 8.8.2?

    Also on your last post you mention that the ehshell tray icon not running as consistently as it used to. This is definitely the case. This has been talked about before on this very thread and a solution was devised by someone to get task manager to run this script saving it to a .vbs file and I can vouch that it always works:-

    ----------------------------------------------------------------------------------------

    dim service, trayrunning, trayrequired, i, objProcess, objShell
    set service = GetObject ("winmgmts:")
    Do While i = 0
    trayrunning = "No"
    trayrequired = "No"
    Set colProcess = service.ExecQuery ("Select * from Win32_Process where NAME like 'eh%' ")
    For Each objProcess in colProcess
    if objProcess.Name = "ehtray.exe" then
    trayrunning = "Yes"
    end if

    if (objProcess.Name = "ehrec.exe") or (objProcess.Name = "ehshell.exe") then
    trayrequired = "Yes"
    end if
    Next

    if (trayrunning = "No") and (trayrequired = "Yes") then
    Set objShell = CreateObject("WScript.Shell")
    objShell.Run "C:\Windows\ehome\ehtray.exe"
    Set objShell = Nothing
    end if

    wscript.sleep(60000)
    Loop

    -----------------------------

    Best Regards

    Gareth North
     
  11. Kévin Chalet

    Kévin Chalet MDL Member

    Apr 11, 2019
    129
    98
    10
    #9152 Kévin Chalet, Apr 12, 2019
    Last edited: Apr 12, 2019
    Thanks for the kind words! :oops:

    Sorry to hear that. I've never used DVBLink personally, but I've heard excellent things about it in the past (too bad it's no longer developed). Do you still need a license to make it work? If not, I may give it a try.
    In your case, are both the server and the client on the same machine? It's possible that the server part uses the same dependencies as Windows Media Center itself (i.e MSVidCtl.dll) and that replacing the system DLL works because it also affects DVBLink (and not just Windows Media Center).

    If you want to investigate yourself, I'd recommend using API monitor (rohitab.com/apimonitor). It's not super complicated to use, but diagnosing such issues is generally a time-consuming operation.

    Actually, I haven't touched CPFilters.dll yet, but it's something we'll have to do for the next iteration of Windows 10 (1903).

    Having a script to keep the ehtray alive was definitely a great idea, but I personally opted for a simpler approach that doesn't require having a separate process nor using WMI + polling to determine whether ehtray.exe is running.
    The approach I used relies on the magical /surviveehschedtermination command line argument to prevent ehtray.exe from shutting down when it detects the ehsched service is not running.
     
  12. LRo

    LRo MDL Novice

    Sep 24, 2016
    7
    0
    0
    I have tried your registry fix, but it does not solve the problem. WMC still freezes in FULLSCREEN. I had changed it manually before, but with the last major update it does not work anymore (often discussed).
    But with my above mentioned solution fullscreen is possible again. But as I also wrote: some buttons on the remote are not working than. Perhaps someone can fix this? :)
     
  13. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    Thanks and yes will be adding the new fixes from your installer.

     
  14. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    I have only tested the execution of the WMC but not it's operation since I do neither have a WMC capable tuner hardware nor I do have a cable/satellite service to receive the signal, so do test the installer and let me know your feedback.

    If the Font link errors are fixed with the kb4493509 update then let me know, I will restore the registry entries in the next release.

    When the WMC x86 pack is ready, the support will be added and WMC UI themes will be avaialble in the next release, Black UI Theme will be added when it's ready.

    Integration is not possible yet as the registry related work is still to be completed.

     
  15. MSMG

    MSMG MDL Developer

    Jul 15, 2011
    6,412
    15,485
    210
    #9156 MSMG, Apr 12, 2019
    Last edited: Apr 12, 2019
    Ok then with W10 v1903, try Setting->Graphics Settings, choose browse to select the wmc executable and select the app to be run as Classic app, now check whether the performance is better in fullscreen.

    Moving the eHome folder to a new location is a bad idea since many wmc registry entry paths are pointed the C:\\Windows\\ehome folder.


     
  16. LRo

    LRo MDL Novice

    Sep 24, 2016
    7
    0
    0
    I know that doing this is problematic. But on the other hand it is the only known way to use full screen.
    Your last idea didn’t work, too.
    The question is: Is it possible to change all the registry paths? It’s the biggest issue we have at the moment and many time it was discussed since it came up last year.
    Would be great if someone can try it. I don’t have the know-how to do it, therefore I ask for it. Thanks in advance. :)
     
  17. StefanR

    StefanR MDL Novice

    Sep 6, 2015
    24
    15
    0
    Rather than copying or moving the ehome directory, this is what I did to get full screen working (I am using the 8.8.1 install):
    1. Go to c:\windows\ehome and copy ehshell.exe to myehshell.exe
    2. Right click on myehshell.exe and select 'properties'
    3. On the compatibility tab, check the 'disable full screen optimization' box
    4. Use myehshell.exe to launch Media Center
    For some reason, Windows seems to ignore the 'disable full screen optimization' on the original file, but will apply it on the copy.

    I'm not sure how this will work with the 8.8.2 / 8.8.3 install, given the need for an external manifest (you may have to also copy ehshell.exe.manifest to myehshell.exe.manifest, but I have little experience in this area)
     
  18. StefanR

    StefanR MDL Novice

    Sep 6, 2015
    24
    15
    0
    Thank you for the magic! I wrote the original script as I could see that ehtray.exe would shut down if nothing else was running. I didn't know about the command line argument at the time - this is a much better solution!
     
  19. LRo

    LRo MDL Novice

    Sep 24, 2016
    7
    0
    0
    Great solution, but the registry entrys are still wrong but I haven’t had any issues up to now with my solution and yours is nearly identical. Therefore this solution should be integrated in the installation scripts in my opinion to solve the full screen problem.

    To all using the Program Imon for the remote control. Here is the solution if you copy the ehshell.exe:
    In Imon manager just add the new eshell.exe to the programs and then import the XP Media settings to this new Programm. Voilá: Everything works like a Charme with the remote.