EPG123 client setup step 2 (TV setup)

An evolving, supported alternative to Rovi
Forum rules
★ Download the latest EPG123 here: https://garyan2.github.io/ <> Setup guide here: https://garyan2.github.io/install.html
Space

Posts: 2841
Joined: Sun Jun 02, 2013 9:44 pm
Location:

HTPC Specs: Show details

#21

Post by Space » Fri Jan 03, 2020 7:52 am

Perhaps the steps in this post will allow you get past this roadblock?

n127

Posts: 44
Joined: Fri Aug 07, 2015 9:28 pm
Location: Fairfax, VA 22031, FiOS

HTPC Specs: Show details

#22

Post by n127 » Fri Jan 03, 2020 3:16 pm

GreenDrazi wrote: Fri Jan 03, 2020 4:45 am I have two other WMC HTPC's and I can't even get the client to launch (Run as Administrator) on them.
Right clicking the installer and using "Run as Administrator" might be a bad idea. At the end of installation, if you ask the installer to run EPG123, it will run elevated. This may or may not be a problem as Windows blocks certain interactions between elevated and UNelevated(WMC) software, so just double click on the installer as you would any other app. It would auto elevate itself as administrator if needed. If you already installed EPG123(with or without "Run as Administrator"), then just start EPG123 from the shortcut, not from the installer; and it would start as a normal user/UNelevated, just like WMC. Things that Windows block if both processes are not on the same level are messages and hooks, which I am guessing that EPG123 is using.

How do I know this might be a problem? I am a software developer. To Gary: When a user just double clicks an installer, the installer uses OpenProcessToken() to get the normal UNelevated token, to use later to start any process at the end of installation by calling CreateProcessAsUser() or ImpersonateLoggedOnUser+CreateProcess, which takes that token as input, so that process starts as the normal UNelevated user. The installer can easily elevate to do administrative stuff. However, if the user used "Run as Administrator", then the token that the installer gets is also elevated, and therefore has no way to run processes at the end of installation as a normal user. The installer can't use CreateProcess/ShellExecuteEx alone(without ImpersonateLoggedOnUser) because these start other processes in the same context as the calling process, so if the process is elevated, all processes that it starts would be elevated as well. It's easy in Windows to start a process elevated, but harder to start process UNelevated. Some try to look for explorer.exe to get its token, but they need to run as the local SYSTEM account in order to get that. So OpenProcessToken() is the easier approach.

GreenDrazi

Posts: 6
Joined: Fri Jan 03, 2020 12:22 am
Location:

HTPC Specs: Show details

#23

Post by GreenDrazi » Fri Jan 03, 2020 5:27 pm

n127 wrote: Fri Jan 03, 2020 3:16 pm
GreenDrazi wrote: Fri Jan 03, 2020 4:45 am I have two other WMC HTPC's and I can't even get the client to launch (Run as Administrator) on them.
Right clicking the installer and using "Run as Administrator" might be a bad idea. At the end of installation, if you ask the installer to run EPG123, it will run elevated. This may or may not be a problem as Windows blocks certain interactions between elevated and UNelevated(WMC) software, so just double click on the installer as you would any other app. It would auto elevate itself as administrator if needed. If you already installed EPG123(with or without "Run as Administrator"), then just start EPG123 from the shortcut, not from the installer; and it would start as a normal user/UNelevated, just like WMC. Things that Windows block if both processes are not on the same level are messages and hooks, which I am guessing that EPG123 is using.

How do I know this might be a problem? I am a software developer. To Gary: When a user just double clicks an installer, the installer uses OpenProcessToken() to get the normal UNelevated token, to use later to start any process at the end of installation by calling CreateProcessAsUser() or ImpersonateLoggedOnUser+CreateProcess, which takes that token as input, so that process starts as the normal UNelevated user. The installer can easily elevate to do administrative stuff. However, if the user used "Run as Administrator", then the token that the installer gets is also elevated, and therefore has no way to run processes at the end of installation as a normal user. The installer can't use CreateProcess/ShellExecuteEx alone(without ImpersonateLoggedOnUser) because these start other processes in the same context as the calling process, so if the process is elevated, all processes that it starts would be elevated as well. It's easy in Windows to start a process elevated, but harder to start process UNelevated. Some try to look for explorer.exe to get its token, but they need to run as the local SYSTEM account in order to get that. So OpenProcessToken() is the easier approach.
Thanks for the feedback.

Sorry for any confusion on my part, but I actually ran the installer (epg123Setup_v1.3.4.0.exe, download zip file unblocked) and then the client exe without using "Run as Administrator" first on both machines. Nothing visibly happens either way. My account is an Administrator account on both. The server exe runs with no problems. Perhaps there may be issues with the client accessing the ehome folder? But I think that the ehome folder rights are the same on all machines.

User avatar
garyan2

Posts: 7480
Joined: Fri Nov 27, 2015 7:23 pm
Location:

HTPC Specs: Show details

#24

Post by garyan2 » Fri Jan 03, 2020 5:42 pm

GreenDrazi wrote: Fri Jan 03, 2020 5:27 pmSorry for any confusion on my part, but I actually ran the installer (epg123Setup_v1.3.4.0.exe, download zip file unblocked) and then the client exe without using "Run as Administrator" first on both machines. Nothing visibly happens either way. My account is an Administrator account on both. The server exe runs with no problems. Perhaps there may be issues with the client accessing the ehome folder? But I think that the ehome folder rights are the same on all machines.
Is there anything in the trace.log file to indicate why it would not open? c:\programdata\garyan2\egp123\trace.log
- Gary
Keeping WMC alive beyond January 2020. https://garyan2.github.io

GreenDrazi

Posts: 6
Joined: Fri Jan 03, 2020 12:22 am
Location:

HTPC Specs: Show details

#25

Post by GreenDrazi » Thu Jan 16, 2020 5:02 pm

garyan2 wrote: Fri Jan 03, 2020 5:42 pm
GreenDrazi wrote: Fri Jan 03, 2020 5:27 pmSorry for any confusion on my part, but I actually ran the installer (epg123Setup_v1.3.4.0.exe, download zip file unblocked) and then the client exe without using "Run as Administrator" first on both machines. Nothing visibly happens either way. My account is an Administrator account on both. The server exe runs with no problems. Perhaps there may be issues with the client accessing the ehome folder? But I think that the ehome folder rights are the same on all machines.
Is there anything in the trace.log file to indicate why it would not open? c:\programdata\garyan2\egp123\trace.log
No. There's nothing in the log from the client. I do get "Activating the epg123 configuration GUI. version 1.3.5.0" after running the server exe.

And this is happening on two computers. On a 3rd computer, I've been able to install and successfully integrate EPG123 into WMC.
All computers are Win10 Pro and I'm using the same user with admin rights on each. The v1.3.5 install files were downloaded separately and unblocked on each before unzipping.

I do see this error below in the Event Viewer. I'm have .NET Framework 4.8 and 3.5 installed on all machines.

Application: epg123Client.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException
at System.Version.Parse(System.String)
at System.Version..ctor(System.String)
at epg123.Program+<>c__DisplayClass3_0.<RedirectAssembly>b__0(System.Object, System.ResolveEventArgs)
at System.AppDomain.OnAssemblyResolveEvent(System.Reflection.RuntimeAssembly, System.String)

Exception Info: System.IO.FileLoadException
at epg123.Program.Main(System.String[])

Post Reply