Setting up Autostart on Windows 10 and other Win 10 issues

I’m starting this here so it can have it’s own thread, for this and other Windows 10 issues. Plexconnect basically works, but some of the setup steps don’t work out as expected. Mainly you can’t invoke Python from a command prompt like it seems you can do in other windows versions. But you can invoke a .py file.

Here’s what happened so far: I set up Plexconnect which works fine, then I installed PyWin32 (for the auto-start) which worked with my version of Python, then I tried to run the install.bat file for setting up the Service. Which failed because I may not have the Plexconnect folder in the right place. I extracted the zip into Program Files, and it created 2 nested folders named “Plexconnect - Master”, the files being in the second folder.

The installer.bat could not find the files it was looking for. So I edited the batch file putting in direct paths to Plexconnect. Plus, because of the Python command issue, I had to run the Batch files from the Python folder itself.

Then when I ran the start batch file, I also had to edit the paths. But when I tried to run it, it did not start the service, it merely opened a command window to my Python folder. So I need to find a syntax that will work with windows 10.

Finally, after I rebooted, the PyWin32 service was running, but Plexconnect wasn’t loaded.

At that point I gave up and just ran Plexconnect.py from an admin command prompt, which is odd because it starts a Python console right up. But you can’t start Python itself using any of the commands from the batch files.

So the Python service starts, but it’s not loading Plexconnect. When I get on my Plex PC I’ll post the batch files as I edited them.

Here is my altered Batch file for installer

@echo off

set InstallerPath=%~dp0
set PlexConnectPath=%InstallerPath%…\

python “C:\Program Files\PlexConnect-master\PlexConnect-master\PlexConnect_WinService.py” install

echo PlexConnect-Service installed

I had to put it in the Python folder for it to run, and I had to put the full path to the py file for it to find it. It actually starts after a reboot, but it’s only running Python and not the script.

And I just noticed this: All of those PlexScriptHost instances were not running 10 minutes after I rebooted. So, it just took a long time to load? So, my task manager seems to be telling me I have two instances of PlexConnect running. If that is so, then the installation actually worked.

But if I did it wrong or if there is a better way, I’d like to know.

Update:

I shut off Delayed Start for the service, it was waiting up to 45 minutes to start Plexconnect. I just restarted Windows 10, and it started my PlexScriptHost immediately, it also started four Python instances. But it’s working.

So, I have eight PlexScriptHost instances and four Python instances. Without the service, it was only 5 python instances. So, is this right for when you run it as a service?

It appears my batch file modifications were correct and the service runs well and starts PlexConnect within the first minute after booting. I still need to know why the original batch file failed to run and why the “start” batch file only opened a command prompt. But if I never find out, at least I know how to get it all happening for if I have to reinstall my Plex Server on another machine.

It’s been working straight for these last few weeks until today, for some reason I lost access, so I decided to do the update that’s been queued for a while now. I actually had it set up the way you described before I figured out the method from my first post. I had to install it as a service and I also had to point to the PY file in a Startup Task. The only thing I miss is the Console view. But it has been very stable, as long as my main PC is running.

I Wish I had bought an ATV4, they were being sold for 70 bucks during Black Friday. But I only had enough to get the refurb ATV3. I like using PlexConnect, I wish I could change the icon but I don’t see how. I have to reboot my PC, be back in a few.