Well, that's the thing. With manual stop/start the file is updated correctly. I don't know what Windows does differently, when the service is stopped caused by a shutdown...
The goal is, to NOT have the need to do it manually.
There is a batch file included on the git for install/start/stop/uninstall
(support/win/uninstall.bat) is the one you are after....
@echo off
set InstallerPath=%~dp0
set PlexConnectPath=%InstallerPath%..\..\
python %PlexConnectPath%PlexConnect_WinService.py remove
echo PlexConnect-Service removed
Open any windows explorer and right click on “Computer” in the left hand side of explorer. Select “Properties” from the menu. This will bring up the system information windows, on the left hand side press “Advanced system settings”. This should launch a windows with the “Advanced” tab already selected, at the bottom press the “Enviroment Variables” button. At the bottom of the next windows is a scroll list called “System Variables”, scroll down the list to find the entry called “Path”, click to highlight it, press “Edit”. DO NOT DELETE THE CONTENT OF “Variable Value” instead add the following to the end:-
;c:\Python27;
Replacing the above path with where ever you installed python. “OK” out of all the dialogs and reboot your computer. Try running python again from a command prompt.
Well, that's the thing. With manual stop/start the file is updated correctly. I don't know what Windows does differently, when the service is stopped caused by a shutdown...
The goal is, to NOT have the need to do it manually.
I made a small change the the installation script below - address' the python not found issue...
@echo off
set InstallerPath=%~dp0
set PlexConnectPath=%InstallerPath%…
if “%PROCESSOR_ARCHITECTURE%”==“AMD64” goto x64
Set PythonPath=C:\Program Files\Python27
goto install
:x64
Set PythonPath=C:\Program Files (x86)\Python27
goto install
Baa you are welcome to include this in future updates if you like.
Also if you want to detect if running on a Windows DC that has DNS running and want to disable DNS service so that PlexConnect runs correctly....
@echo off
cls
sc query "DNS" | find "RUNNING" >1
if "%ERRORLEVEL%"=="0" (
sc stop DNS
sc config DNS start=disabled
echo DNS is now stopped and disabled!
) else (
echo DNS is not running.
)
this one needs elevated privileges to run correctly.
How high is the risk the your two directories won't fit the bill? My opinion: very high. I don't think that we should set environment variables that we have no background in defining...
Good that you already fixed the IF-else-stucture. :-)
>>DNS
I don't think other will be happy with that. In the end you cancel out their main DNS, leaving them somewhat alone, even killing the chance that a reboot might fix things.
>>PythonPath
How high is the risk the your two directories won't fit the bill? My opinion: very high. I don't think that we should set environment variables that we have no background in defining...
Good that you already fixed the IF-else-stucture. :-)
>>DNS
I don't think other will be happy with that. In the end you cancel out their main DNS, leaving them somewhat alone, even killing the chance that a reboot might fix things.
Fair enough. Just trying to offer some further help for other that may have had the same problem as me...
And of course in regards to the DNS changes - you don't have to run it or you can modify it to not disable the DNS.