Last active
October 26, 2021 21:17
-
-
Save suuhm/c304f3b5677a8e5b751a573e2e2f1718 to your computer and use it in GitHub Desktop.
Terratec TS22 Windows 7 x64 Driver fix to bypass the Shutdown bug. Just create shortcuts or set in sheduler
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
@echo off | |
SETLOCAL EnableDelayedExpansion | |
:: | |
:: (c) Suuhmer - 2021 | |
:: All rights reserved | |
:: | |
:: call: terratec-ts22-driver-start-stop.bat [enable|disable] | |
:: | |
:: YOU HAVE TO RUN AS ADMIN THIS SCRIPT! | |
:: | |
:: CLASS GUID : {4d36e96c-e325-11ce-bfc1-08002be10318} | |
:: SETTING UPPER FILTERS | |
SET HW_ID=PCI\VEN_1412 | |
SET SLEEP=3666 | |
echo\ | |
echo ----------------------------- | |
echo -- TS22 DEVICE STARTER 0.1 -- | |
echo ----------------------------- | |
echo\ | |
:: MANUAL ARGUMENTS SET? | |
IF "%1"=="enable" ( | |
devcon enable %HW_ID% | |
echo TS22 activated | |
ping -w %SLEEP% -n 1 2.0.0.0 >nul | |
exit | |
) ELSE IF "%1"=="disable" ( | |
devcon disable %HW_ID% | |
echo TS22 deactivated | |
ping -w %SLEEP% -n 1 2.0.0.0 >nul | |
exit | |
) | |
echo\ | |
echo No Arguments set continue auto-mode... | |
echo call: terratec-ts22-driver-start-stop.bat ^[enable^|disable^] | |
echo\ | |
ping -w %SLEEP% -n 1 2.0.0.0 >nul | |
FOR /F "tokens=3 delims= " %%a in ('devcon.exe status %HW_ID% ^| findstr "is"') do SET OUTVAR=%%a | |
:: devcon status %HW_ID% | findstr "running" > %a | |
echo Status is : !OUTVAR! | |
echo\ | |
ping -w %SLEEP% -n 1 2.0.0.0 >nul | |
IF !OUTVAR!==disabled^. ( | |
devcon enable %HW_ID% | |
echo TS22 activated | |
ping -w %SLEEP% -n 1 2.0.0.0 >nul | |
) ELSE IF !OUTVAR!==running^. ( | |
devcon disable %HW_ID% | |
echo TS22 deactivated | |
ping -w %SLEEP% -n 1 2.0.0.0 >nul | |
) ELSE ( | |
echo FAULT 10 UPPERFILTERS REGEDIT? EXIT NOW... | |
ping -w %SLEEP% -n 1 2.0.0.0 >nul | |
echo\ & echo Press enter to exit now and restart this script again! & pause>nul | |
exit | |
) | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment