Last active
January 7, 2018 05:48
-
-
Save nns779/68e7228e6d896ed7b33c444981b1d01e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: U4FilterInstaller.bat | |
@echo off | |
setlocal | |
echo Filter Installer for PLEX PX-W3U4/PX-Q3U4/PX-W3PE4/PX-Q3PE4 | |
echo, | |
if /i "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( | |
set regsvr32_path=%SystemRoot%\SysWOW64\regsvr32.exe | |
) else ( | |
if /i "%PROCESSOR_ARCHITECTURE%" == "x86" ( | |
set regsvr32_path=%SystemRoot%\System32\regsvr32.exe | |
) else ( | |
echo Unsupported architecture. | |
goto end | |
) | |
) | |
cd /d %~dp0 | |
:select_mode | |
echo i: Install | |
echo u: Uninstall | |
echo q: Quit | |
set /p mode=">" | |
if /i "%mode%" == "i" goto install | |
if /i "%mode%" == "u" goto uninstall | |
if /i "%mode%" == "q" goto end | |
goto select_mode | |
:install | |
echo, | |
echo ---------------- | |
echo Install | |
echo ---------------- | |
"%regsvr32_path%" /s DWNetworkProvider.ax | |
if %errorlevel% neq 0 ( | |
echo [DWNetworkProvider.ax] regsvr32 failed. ^(%errorlevel%^) | |
goto failed | |
) | |
echo [DWNetworkProvider.ax] ok | |
"%regsvr32_path%" /s DWNullTerminal.ax | |
if %errorlevel% neq 0 ( | |
echo [DWNullTerminal.ax] regsvr32 failed. ^(%errorlevel%^) | |
goto failed | |
) | |
echo [DWNullTerminal.ax] ok | |
"%regsvr32_path%" /s DWMpegVideoDecoder.ax | |
if %errorlevel% neq 0 ( | |
echo [DWMpegVideoDecoder.ax] regsvr32 failed. ^(%errorlevel%^) | |
goto failed | |
) | |
echo [DWMpegVideoDecoder.ax] ok | |
goto ok | |
:uninstall | |
echo, | |
echo ---------------- | |
echo Uninstall | |
echo ---------------- | |
"%regsvr32_path%" /u /s DWNetworkProvider.ax | |
if %errorlevel% neq 0 ( | |
echo [DWNetworkProvider.ax] regsvr32 failed. ^(%errorlevel%^) | |
goto failed | |
) | |
echo [DWNetworkProvider.ax] ok | |
"%regsvr32_path%" /u /s DWNullTerminal.ax | |
if %errorlevel% neq 0 ( | |
echo [DWNullTerminal.ax] regsvr32 failed. ^(%errorlevel%^) | |
goto failed | |
) | |
echo [DWNullTerminal.ax] ok | |
"%regsvr32_path%" /u /s DWMpegVideoDecoder.ax | |
if %errorlevel% neq 0 ( | |
echo [DWMpegVideoDecoder.ax] regsvr32 failed. ^(%errorlevel%^) | |
goto failed | |
) | |
echo [DWMpegVideoDecoder.ax] ok | |
goto ok | |
:failed | |
echo The operation failed. | |
goto end | |
:ok | |
echo The operation completed successfully. | |
goto end | |
:end | |
echo, | |
set /p dummy="Press any key to exit..." < NUL | |
endlocal | |
pause > NUL | |
echo, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment