2013-10-02, 05:08 PM
(This post was last modified: 2013-10-02, 05:24 PM by johnsonx42.)
I really wish someone would fix that SoftPVR install script and have it install to C:\SoftPVR. Installing under the NPVR directory just creates extra headaches, complicates troubleshooting, and implies SoftPVR is somehow related to NPVR which is completely false. The script itself is well written, but maybe a little too clever.
Ok, here's my cut at it... untested, but I all I did was set %npvrdir% to SystemDrive (usually c:\) and changed a few comments:
Ok, here's my cut at it... untested, but I all I did was set %npvrdir% to SystemDrive (usually c:\) and changed a few comments:
Code:
@ECHO OFF
@rem Modified by: PBS
@rem changed to install to C:\SoftPVR by johnsonx42
@echo.
@ECHO ********************************************************
@ECHO SoftPVR installer for Analog devices. (32 OR 64 bit OS)
@ECHO ********************************************************
@echo.
@rem Check for admin rights and echo msg and exit if none.....
net session >nul 2>&1
if %errorLevel% == 0 (
@echo Success: Administrative permissions confirmed.
) else (
@echo Failure: Current permissions inadequate. This script needs to be run with Admin priviledges..
pause
exit
)
cd /d "%~dp0"
@echo.
@rem This line detects 32bit or 64bit..
@IF DEFINED ProgramFiles(x86) (
set sysdir=Syswow64
set softnode=SOFTWARE\Wow6432Node
) else (
set sysdir=System32
set softnode=SOFTWARE
)
@echo This machine's system dir is "%systemroot%\%sysdir%"
@echo And it's software registry section is HKLM\%softnode%\NPVR
@echo.
@rem script used to install under NPVR program directory. now just install to c:\softpvr (or whatever the systemdrive is)
@rem keeping "npvrdir" variable to avoid changing the rest of the script; change the next line if you want a different drive
set npvrdir=%SystemDrive%
@echo Installing to %npvrdir%\SoftPVR
@ECHO.
@ECHO Creating SoftPVR folder
@MD "%npvrdir%\SoftPVR\"
@ECHO Creating Temp folders
@MD "SoftPVR_temp1"
@MD "SoftPVR_temp2"
@ECHO.
@ECHO Extracting WinTV installer
@rem This line lists dir for files starting with wintv7_cd_ by date and executes only newest one [regardless of filename ending] with params....
for /f %%f in ('dir /b /o:-d "wintv7_cd_*.exe"') do (
"%%~f" /x SoftPVR_temp1
goto :next
)
@rem Missing wintv7_*.exe file error message...
@if errorlevel 1 (@echo.
@echo NO WINTV7_cd_*.exe file found!!!
@echo Download file first and place in C:\Temp
@echo [create dir if needed]
@echo.
pause
exit)
:next
@rem Executing extracted wintv7setup.exe
"SoftPVR_temp1\WinTV7Setup.exe" /x SoftPVR_temp2
@ECHO.
@ECHO Copying required files
COPY "SoftPVR_temp2\hcw_mcl2ae.ax" "%npvrdir%\SoftPVR\"
COPY "SoftPVR_temp2\hcw_mcm2ve.ax" "%npvrdir%\SoftPVR\"
COPY "SoftPVR_temp2\hcw_mcmpeg2mux.ax" "%npvrdir%\SoftPVR\"
COPY "SoftPVR_temp2\hcw_mcmpgaout.dll" "%npvrdir%\SoftPVR\"
COPY "SoftPVR_temp2\hcw_mcmpgvout.004" "%npvrdir%\SoftPVR\"
COPY "SoftPVR_temp2\hcw_mcmpgvout.dll" "%npvrdir%\SoftPVR\"
@ECHO.
@rem These lines register filters, showing and pausing only if error occurs..
@ECHO Registering files
%SystemRoot%\%sysdir%\Regsvr32.exe /s "%npvrdir%\SoftPVR\hcw_mcl2ae.ax"
@if errorlevel 1 (@echo **** "%npvrdir%\SoftPVR\hcw_mcl2ae.ax" was NOT REGISTERED correctly!!!!! ********************&& pause)
%SystemRoot%\%sysdir%\Regsvr32.exe /s "%npvrdir%\SoftPVR\hcw_mcm2ve.ax"
@if errorlevel 1 (@echo **** "%npvrdir%\SoftPVR\hcw_mcm2ve.ax" was NOT REGISTERED correctly!!!!! ********************&& pause)
%SystemRoot%\%sysdir%\Regsvr32.exe /s "%npvrdir%\SoftPVR\hcw_mcmpeg2mux.ax"
@if errorlevel 1 (@echo **** "%npvrdir%\SoftPVR\hcw_mcmpeg2mux.ax" was NOT REGISTERED correctly!!!!! ********************&& pause)
@ECHO.
@ECHO Deleting Temp Folders
RD "SoftPVR_temp1\" /s /q
RD "SoftPVR_temp2\" /s /q
@ECHO.
@ECHO Successful!!
@ECHO.
pause
server: NextPVR 5.0.7/Win10 2004/64-bit/AMD A6-7400k/hvr-2250 & hvr-1250/Winegard Flatwave antenna/Schedules Direct
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV
main client: NextPVR 5.0.7 Desktop Client; LG 50UH5500 WebOS 3.0 TV