![]() |
|
|||||||
| SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Having a hard time with upgrading EXE's
Quote:
What am I missing here? Batch File for the curious: Code:
@echo off
REM Last revision 9/26/2015
xcopy /y sage*.exe %TEMP%\SageTV9\
xcopy /y jars\*.jar %TEMP%\SageTV9\jars\
set USERTEMP=%TEMP%
CLS
ECHO.
ECHO =============================
ECHO SageTV V9 Upgrade
ECHO =============================
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO SageTV V9 Upgrade
ECHO **************************************
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B
:gotPrivileges
::::::::::::::::::::::::::::
:START
::::::::::::::::::::::::::::
setlocal & pushd .
REM Run shell as admin
setlocal
:PROMPT
SET /P AREYOUSURE=Have you removed the Lucene Plugin? (Y/[N])?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END
Goto DoIt
:END
rem endlocal
echo Install Aborted.
pause
exit
:DoIt
endlocal
cls
set /p SageKey="Sage License Key (Only required for Server): " %=%
setx -m SAGETVUSERKEY %SageKey%
if exist "c:\program files\SageTV\SageTV\SageTVPlayer.exe" goto x86
if exist "c:\program files (x86)\SageTV\SageTV\SageTVPlayer.exe" goto x64
echo I can't find your SageTV Installation - Operation Aborted.
pause
exit
:x86
echo Stopping SageTV Applications & Services
net stop sagetv
taskkill /f /im:SageTV.exe
taskkill /f /im:SageTVClient.exe
taskkill /f /im:SageTVService.exe
del "c:\program files\SageTV\SageTV\JARs\lucen*.jar"
xcopy /s /y %USERTEMP%\SageTV9\*.* "c:\program files\SageTV\SageTV\"
goto finished
:x64
echo Stopping SageTV Applications & Services
net stop sagetv
taskkill /f /im:SageTV.exe
taskkill /f /im:SageTVClient.exe
taskkill /f /im:SageTVService.exe
del "c:\program files (x86)\SageTV\SageTV\JARs\lucen*.jar"
xcopy /s /y %USERTEMP%\SageTV9\*.* "c:\program files (x86)\SageTV\SageTV\"
goto finished
:finished
echo Update Complete
net start sagetv
pause
exit
__________________
SageTV 9 / 3 SageTV Clients / Ceton InfiniTV 6 / ComSkip |
|
#2
|
||||
|
||||
|
Service mode is not working for me either. I thought it was just me having this problem. Not sure how to diagnose.
__________________
Intel Core i5-2500, 16GB RAM, OMV Linux 4.17, 3 TB of Data SageTV 9 Docker, Open DCT Docker Silicondust HDHomeRun Duo + Quatro Sage Mini Client on Amazon Fire Sticks and Android TVs |
|
#3
|
||||
|
||||
|
Dang!
Ok - well I'm glad it's not just me. FYI - it appears once the service runs it changes the WIZ.BIN so it's no longer compatible with 7.1. I'm pretty sure I had seen that in the notes somewhere and had made a backup. I suppose I should add backing up the WIZ.BIN and SAGE.PROPERTIES files while I'm at it.
__________________
SageTV 9 / 3 SageTV Clients / Ceton InfiniTV 6 / ComSkip |
|
#4
|
||||
|
||||
|
So it converts out back when in app mode? I've switched back to app mode after service mode problems without any problem.
__________________
Intel Core i5-2500, 16GB RAM, OMV Linux 4.17, 3 TB of Data SageTV 9 Docker, Open DCT Docker Silicondust HDHomeRun Duo + Quatro Sage Mini Client on Amazon Fire Sticks and Android TVs |
|
#5
|
|||
|
|||
|
Quote:
You can use net stop to stop the Sage Service rather than killing it. You might want to back up the upgraded files (maybe with sage7 extension) before deleting them ? |
|
#6
|
||||
|
||||
|
Quote:
I was planning on 7zipping it up into a self extracting archive with all the exe's and jars. I suppose I should really have it determine if it's a client install and only copy the truly necessary files - it's just quick and dirty the way it is, but I figure nobody has shortcuts to the unnecessary files anyway.
__________________
SageTV 9 / 3 SageTV Clients / Ceton InfiniTV 6 / ComSkip Last edited by scoful; 09-27-2015 at 02:43 PM. |
|
#7
|
||||
|
||||
|
So did you get it to work running as a service? My server is headless so I don't want to run in app mode.
__________________
SageTV 9 / 3 SageTV Clients / Ceton InfiniTV 6 / ComSkip |
|
#8
|
||||
|
||||
|
No. Service mode does not work for me at all. I've tried a few things and cannot get it to work. I'm guessing this does not create logs of any type so not sure what to do.
__________________
Intel Core i5-2500, 16GB RAM, OMV Linux 4.17, 3 TB of Data SageTV 9 Docker, Open DCT Docker Silicondust HDHomeRun Duo + Quatro Sage Mini Client on Amazon Fire Sticks and Android TVs |
|
#9
|
||||
|
||||
|
Are you sure you're using the most recent .exe builds? The files in the post lined to in your first post are not the most recent, and specifically didn't work in service mode. There are newer builds later in that thread that fixed the service issue.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
|
#10
|
||||
|
||||
|
Quote:
If we could get a closed sticky going for the Windows builds that would be really cool to make them easier to find. I've modified my batch file installer to FTP download the current executables before it runs too so if the FTP folder is kept up to date all that has to be done is run the batch file to pull the updates before it copies them over. I've updated the batch file code if someone wants to check it out. I haven't had time to test it this morning, but it should download all of the EXE's and JAR's from my FTP server as well as the current version of the update script. After the download it will restart the script and verify it's the current version and copy the updates over. Code:
@echo off
REM Last revision 9/28/2015
xcopy /y sage*.exe %TEMP%\SageTV9\
xcopy /y jars\*.jar %TEMP%\SageTV9\jars\
set USERTEMP=%TEMP%
CLS
ECHO.
ECHO =============================
ECHO SageTV V9 Upgrade
ECHO =============================
:checkPrivileges
NET FILE 1>NUL 2>NUL
if '%errorlevel%' == '0' ( goto gotPrivileges ) else ( goto getPrivileges )
:getPrivileges
if '%1'=='ELEV' (shift & goto gotPrivileges)
ECHO.
ECHO **************************************
ECHO SageTV V9 Upgrade
ECHO **************************************
setlocal DisableDelayedExpansion
set "batchPath=%~0"
setlocal EnableDelayedExpansion
ECHO Set UAC = CreateObject^("Shell.Application"^) > "%temp%\OEgetPrivileges.vbs"
ECHO UAC.ShellExecute "!batchPath!", "ELEV", "", "runas", 1 >> "%temp%\OEgetPrivileges.vbs"
"%temp%\OEgetPrivileges.vbs"
exit /B
:gotPrivileges
::::::::::::::::::::::::::::
:START
::::::::::::::::::::::::::::
setlocal & pushd .
REM Run shell as admin
setlocal
setlocal DisableDelayedExpansion
:PROMPT
SET /P AREYOUSURE=Have you removed the Lucene Plugin? (Y/[N])?
IF /I "%AREYOUSURE%" NEQ "Y" GOTO END
Goto DoIt
:END
rem endlocal
echo Install Aborted.
pause
exit
:DoIt
endlocal
REM Create ftp profile to download update components
REM Create Firewall Exception for Native FTP Client
netsh advfirewall firewall add rule name="FTP Client" dir=in action=allow program="%windir%\System32\ftp.exe" enable=yes
REM Create Local Temp Folders to store updates
del /q "%USERTEMP%\SageTV9\*.*"
del /q "%USERTEMP%\SageTV9\jars\*.*"
md "%USERTEMP%\SageTV9"
md "%USERTEMP%\SageTV9\jars"
REM Check Script Version
set ThisVersion=150929A
echo Script Version %ThisVersion%
set ReRunFlag=0
echo %USERTEMP%
set /p SCRIPTVER=<"%USERTEMP%\scriptver.txt"
If '%SCRIPTVER%'=='%ThisVersion%' goto NoNeedToUpdate
:SetScriptVersion
echo %ThisVersion%>"%USERTEMP%\scriptver.txt"
echo %SCRIPTVER%=%ThisVersion%
goto CreateFTPScript
:CreateFTPScript
echo open ftp1.dpi.bz> "%USERTEMP%\SageTV9\updates.ftp"
echo anonymous>> "%USERTEMP%\SageTV9\updates.ftp"
echo guest>> "%USERTEMP%\SageTV9\updates.ftp"
echo lcd /D "%USERTEMP%\SageTV">> "%USERTEMP%\SageTV9\updates.ftp"
echo cd Installers/>> "%USERTEMP%\SageTV9\updates.ftp"
echo cd SageTV9/>> "%USERTEMP%\SageTV9\updates.ftp"
echo binary>> "%USERTEMP%\SageTV9\updates.ftp"
echo mget *.*>> "%USERTEMP%\SageTV9\updates.ftp"
rem Download jars Subfolder Contents
echo lcd "%USERTEMP%\SageTV9\jars">> "%USERTEMP%\SageTV\updates.ftp"
echo cd jars/>> "%USERTEMP%\SageTV9\updates.ftp"
echo binary>> "%USERTEMP%\SageTV9\updates.ftp"
echo mget *.*>> "%USERTEMP%\SageTV9\updates.ftp"
rem Wrap up FTP Connection
echo disconnect>> "%USERTEMP%\SageTV9\updates.ftp"
echo quit>> "%USERTEMP%\SageTV9\updates.ftp"
REM Execute FTP Script
Echo Downloading Updates
ftp -g -i -s:"%USERTEMP%\SageTV9\updates.ftp"
Echo Updates Downloaded.
Echo Restarting Updated Script.
start "" "%USERTEMP%\SageTV9\UpgradeSageTV7_1to9.bat"
exit
:NoNeedToUpdate
REM Script Is Current - Proceed With Updates
set /p SageKey="Sage License Key (Only required for Server): " %=%
setx -m SAGETVUSERKEY %SageKey%
set mdate="%date:~7,2%-%date:~4,2%-%date:~10,4%"
set fname=%mdate%
set ftime=%time:~0,2%%time:~3,2%%time:~6,2%
if exist "c:\program files\SageTV\SageTV\SageTVPlayer.exe" goto x86
if exist "c:\program files (x86)\SageTV\SageTV\SageTVPlayer.exe" goto x64
echo I can't find your SageTV Installation - Operation Aborted.
pause
exit
:x86
set SagePath="c:\program files\SageTV\SageTV"
goto UpdateIt
:x64
set SagePath="c:\program files (x86)\SageTV\SageTV"
goto UpdateIt
:UpdateIt
echo Stopping SageTV Applications & Services
net stop sagetv
taskkill /f /im:SageTV.exe
taskkill /f /im:SageTVClient.exe
taskkill /f /im:SageTVService.exe
del "%SagePath%\JARs\lucen*.jar"
rem make backup copies to time/date stamped folder
xcopy "%SagePath%\Sage*.exe" "%SagePath%\Backups\%fname%%ftime%\"
xcopy "%SagePath%\WIZ.BIN" "%SagePath%\Backups\%fname%%ftime%\"
xcopy "%SagePath%\Sage*.PROPERTIES" "%SagePath%\Backups\%fname%%ftime%\"
xcopy /s /y %USERTEMP%\SageTV9\*.* "%SagePath%\"
goto finished
:finished
echo Update Complete
netsh advfirewall firewall delete rule name="FTP Client" program="%windir%\System32\ftp.exe"
del "%USERTEMP%\scriptver.txt"
net start sagetv
pause
exit
__________________
SageTV 9 / 3 SageTV Clients / Ceton InfiniTV 6 / ComSkip Last edited by scoful; 09-29-2015 at 05:42 AM. |
|
#11
|
||||
|
||||
|
Realized that he went in and edited the old post to include the updated EXE's. Those should be working. What is the service doing for you guys?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
|
#12
|
||||
|
||||
|
Quote:
I did examine the link I downloaded from and it appeared to be different from one further down the thread, so the files I put on my ftp server should be current, but won't have time to test the script or the new exe's for a couple of days unless I have a bout of insomnia tonight - which is not entirely unlikely.
__________________
SageTV 9 / 3 SageTV Clients / Ceton InfiniTV 6 / ComSkip |
|
#13
|
||||
|
||||
|
Quote:
Quote:
Sorry for the trouble I may have caused. All the more reason to bundle things up to be less confusing.
__________________
Intel Core i5-2500, 16GB RAM, OMV Linux 4.17, 3 TB of Data SageTV 9 Docker, Open DCT Docker Silicondust HDHomeRun Duo + Quatro Sage Mini Client on Amazon Fire Sticks and Android TVs |
|
#14
|
||||
|
||||
|
I guess I spoke to soon. Service mode appears to be working for me now. I managed to get it working by going into windows services and manually starting the service. At first I thought it was still broken as I could not see the web server, but after a couple of minutes the web server did start responding. I guess the service is just taking a lot longer than I'm used to.
I did have an issue with SageTVServiceControl.exe giving me an error saying that the service did not start in a timely fashion earlier after coming back to Win7. Everything appears to be working fine now. Perhaps just give it a bit more time and it may actually be working for you as well.
__________________
Intel Core i5-2500, 16GB RAM, OMV Linux 4.17, 3 TB of Data SageTV 9 Docker, Open DCT Docker Silicondust HDHomeRun Duo + Quatro Sage Mini Client on Amazon Fire Sticks and Android TVs |
|
#15
|
||||
|
||||
|
On the first start with a new version, it will usually take longer, as it validates and updates the wiz.bin.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| hard drive idle spin down power down sleep inactivity time etc | korben_dallas | Hardware Support | 1 | 01-23-2010 06:51 AM |
| Hard time getting Hallmark to show up.. | spazmanian | SageTV EPG Service | 0 | 12-19-2009 10:16 AM |
| Video does not continue from where it stopped last time (after upgrading) | Moskus | SageTV Placeshifter | 1 | 02-26-2009 06:54 AM |
| Daylight Savings Time and NTFS time stamps - 1 hour off? | Opus4 | The SageTV Community | 2 | 11-01-2006 11:34 PM |
| hard time with USB-UIRT and Sony IO Cable box | jrbig | Hardware Support | 1 | 03-29-2005 02:53 PM |