Guide to getting PlexConnect Setup as a Windows Service

My original post on the Plex Forums

Here’s a quick guide to making PlexConnect into a Windows Service, uses SRVAny to run it.

Some notes, SRVAny is not officially supported on Windows Vista/7/8 but works just fine for me in various other things I use it for. Also I don’t have an Apple TV, or anything to test the functionality, so I assume you know how to get that running, as I’ve not even looked into that. I just know it start’s and says it’s working. Oh there is also NSSM that can be used instead of SRVAny, upto you, the install is pretty much the same either way (except NSSM has a graphical Service Installer)

Compiling PlexConnect Yes, you could compile it, but that just adds complexity to updating/fixing/debugging. At least this way you are running vanilla code, and you can go back to the developer with issues. However compiling does have other advantages if it compiles correctly there is a whole lot less hassle as you don’t need the Python runtime installed on the box, but that’s not an issue I wouldn’t think.

Requirements :

  • SRVAny – I’ve put it into a ZIP so you don’t need the whole Server2003 ResKit – Download
  • Python 2.7 – On windows I tend to use ActiveState‘s version, just because it’s easier – Download
  • PlexConnect – Just download the ZIP file from the GIT – Download
  • Service Registry File – if you use the same paths etc, this will save you typing it – Download

Guide

  1. Install Python, I’ve used C:\Python2.7 as the file location, upto you where it goes, just make sure you replace any path names with wherever you have put yours.
  2. Unzip PlexConnect, it will create a Plexconnect-Package folder, rename it to c:\PlexConnect (again upto you where it goes)
  3. Unzip the SRVAny zip and put the two exe files into the PlexConnect folder.
  4. <Make sure you configure PlexConnect>
  5. Once you are sure that PlexConnect is running just fine (see ScreenShot of mine working) then continue, if it’s not working just running from the shell then make sure you get it going now
    Working.PNG
  6. OK, so we have a working setup (well mine is bitching about certificates or something, but hey), now we need to install the service, make sure your command prompt is an admin one (right click the cmd link, then select start as admin)
    AdminCommandPromt.png
  7. CD to c:\PlexConnect and then run instsrv PlexConnect c:\plexConnect\srvany.exe Make sure that it’s installed correctly (see screenshot)
    ServiceInstall.PNG
  8. Next thing fire up Regedit, and navigate to the right section (see Screenshot), add the key, and then the two Data values as highlighted below (Make sure the case is right or if following the guide, then download this reg file and run it).
    Registry.PNG
  9. From the command prompt type services.msc that will launch the service’s manager, wander down to the service and make sure it looks right, and the startup is set to automatic
    Services.PNG
  10. Click the start button, then OK, and you should now see that the service is running
    serviceRunning.PNG
  11. And as Elan (and South Park) would say…. Profit
  12. Oh if this helped… Click the Like button below Thanks ……

I’ve attached a ZIP here Certificates InstallPlexConnect and here’s the post that goes with them.

OK, had a few minutes to spare, and the VM was running anyhow, so here we have a batch file that ‘should’ do it all.

It downloads the bits it needs (including Python and PlexConnect), put’s them in the right places on disk, and creates the service.

It’s very crude, and simplistic, but works on my VM. Like I’ve said before I’ve not got an AppleTV to do any testing, so I leave that upto the people that do have it.

I suppose I should explain usage… Doh

Unzip to any folder you like, and run the InstallPlexConnect.cmd as an Admin. It will make all the folders etc, it will install it all on C:, so edit the script and reg file if needs be.

Also if you already have Python installed, edit the CMD and take out the download and the install sections out, and edit the reg file to point to the right place for the Python.exe file.

EDIT : Just looked into what needs to get it working, seems there is some cert’s that are required. I’ve uploaded some I made into the Certificates.zip file. You need to extract them to the certificates sub folder in c:\PlexConnect to get it all working. They are just generic SelfSSL ones, so can’t see why uploading them would be deemed bad, but if it is, let me know and I’ll delete them.