TechieGuy12 / PlexServerAutoUpdater

Automatically update Plex when running the Plex service.
MIT License
118 stars 9 forks source link

[Feature request] Allow arbitrary service names #49

Closed prenetic closed 1 year ago

prenetic commented 3 years ago

I may be mistaken, but it seems this solution only allows/looks for one particular service name and fails if it is not detected. It would be great if there were an optional parameter to specify a non-standard service names. This would expand the use case to individuals who have relied on other methods to create and manage Plex as a Windows service (FireDaemon, NSSM, srvany, etc.).

J-T-W commented 2 years ago

I also would like to use this utility - using NSSM to manage the Plex service.

TechieGuy12 commented 1 year ago

The latest version allows you to specify the service name in the config file.

prenetic commented 1 year ago

Thanks for adding this in, just wanted to share an issue getting this working. I've got Plex installed to its default location and it's currently set up to run via a virtual service account. When I run the psupdate.exe binary I'm told the Plex data folder could not be found. For reference, the Plex data folder is located in C:\Windows\ServiceProfiles\PlexMediaServer\AppData\Local\Plex Media Server. As far as I'm aware you can't run scheduled tasks with virtual user accounts since they're intended for services, so there may not be a workaround for my scenario.

2022-11-05 15:04:06 Getting windows user.
2022-11-05 15:04:06 Checking if user is an administrator.
2022-11-05 15:04:06 Initializing the update window.
2022-11-05 15:04:06 Initializing the timer object.
2022-11-05 15:04:06 Initializing the Plex media server object.
2022-11-05 15:04:06 Getting the service user.
2022-11-05 15:04:06 The Plex service is installed. Let's get the user associated with the service.
2022-11-05 15:04:06 The Plex service user: NT Service\PlexMediaServer.
2022-11-05 15:04:06 Plex install folder: C:\Program Files (x86)\Plex\Plex Media Server.
2022-11-05 15:04:07 Message:
The Plex local application data folder could not be found for the Plex Windows account.

Inner Exception:

Stack Trace:
   at TE.Plex.MediaServer.Initialize()
   at TE.Plex.MediaServer..ctor(MessageChangedEventHandler handler)
   at TE.Plex.MainForm.Initialize()
2022-11-05 15:04:07 Displaying the update window.
2022-11-05 15:04:07 Closing the application.