cjmurph / PmsService

Plex Media Server service wrapper for windows
MIT License
514 stars 58 forks source link

Plex Update #45

Closed hessercan closed 1 year ago

hessercan commented 4 years ago

Are any updates being worked on to address the update issue? It shouldn't be hard for the updater to be automatically run as administrator without the UAC prompt.

cjmurph commented 4 years ago

If by update issue you mean you shouldn't use the updates via the plex web interface if you use this service... the anwser is no.

Years ago I started speaking to the plex guys about looking for a specific exit code so I could know it was an update and not auto restart the service. Then the plex forum hack happened and we never got back to it.

This service specifically does not require admin rights, therefore, it won't be installing anything.

d8ahazard commented 2 years ago

@cjmurph , @hessercan - Almost got a fix for this one worked out too.

By using the registry to find the pms data path, then setting a filewatcher on the log for the plex update service, it's pretty easy to determine when Plex has stopped itself to install an update - then wait for the log to indicate it's been restarted, then kill the process and grab it again with the service. ;)

Just testing it out now to ensure I didn't do anything dumb, and that'll be pushed to my fork of this till murph and I can chat a bit.

TechieGuy12 commented 2 years ago

Just curious which registry key you are using? The LocalAppData value in the Plex registry key isn't reliable as not all installs have the key. That key isn't needed to run Plex.

d8ahazard commented 2 years ago

Just curious which registry key you are using? The LocalAppData value in the Plex registry key isn't reliable as not all installs have the key. That key isn't needed to run Plex.

Good point!

That is the key I was looking for, and given your suggestion, I've added a bit to the helper that starts by looking in %localappdata%... (default) location, and then checking in the registry if it's not in the default position.

image

TechieGuy12 commented 2 years ago

That should work. I believe the LocalAppDataPath registry key doesn't include the Plex Media Server folder, so if you are returning that folder, as you do with the first Environment.SpecialFolder.LocalApplicationData check, you will need to append "Plex Media Server" to the registry key value.

d8ahazard commented 2 years ago

Noted and done. 😄

On Wed, Dec 8, 2021, 7:15 AM Paul Salmon @.***> wrote:

That should work. I believe the LocalAppDataPath registry key doesn't include the Plex Media Server folder, so if you are returning that folder, as you do with the first Environment.SpecialFolder.LocalApplicationData check, you will need to append "Plex Media Server" to the registry key value.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cjmurph/PmsService/issues/45#issuecomment-988805507, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMO4NH7YOEU4DTCGZXCFYDUP5LABANCNFSM4J7EWURQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

arrmo commented 1 year ago

Sorry, trying to understand this one - and not fully getting it 😞. Is this the case where PMS is stuck in the state of Plex updating?

Thanks!

cjmurph commented 1 year ago

Sorry, trying to understand this one - and not fully getting it 😞. Is this the case where PMS is stuck in the state of Plex updating?

Thanks!

no, this issue is for the plex service to handle updates at all. I see why it would get stuck in updating, I noticed last night while testing that while one update worked, another seemed to require user input and since the update was happening in session 0, that wasn't possible. In that case, plex was stuck "updating" and in fact will not update and will not restart. That is in fact a seperate issue.

arrmo commented 1 year ago

Meaning the update was waiting for user input => and it's hidden, so can't see it, nor respond. Correct? The problem in that case is no real way to restart it?

Thanks!

cjmurph commented 1 year ago

It seems like it.

arrmo commented 1 year ago

That makes sense - and no real way around it I assume?

Thanks!