@echo off echo Stop SageTV Service... net stop SageTV echo Waiting 20 seconds to allow SageTV to stop... @ping 127.0.0.1 -n 20 -w 1000> nul echo Backup Sagetv Config ... C: CD \Program Files\SageTV\SageTV\ copy Wiz.bin E:\Backup\SageConfig /Y copy Wiz.bak E:\Backup\SageConfig /Y copy Sage.properties E:\Backup\SageConfig /Y echo Restart HD-PVR #1... c:\windows\system32\devcon restart "@USB\VID_2040&PID_4901\00A27A22" echo Waiting 20 seconds to allow USB Device to restart... @ping 127.0.0.1 -n 20 -w 1000> nul echo Restart HD-PVR #2... c:\windows\system32\devcon restart "@USB\VID_2040&PID_4901\00A31A44" echo Waiting 20 seconds to allow USB Device to restart... @ping 127.0.0.1 -n 20 -w 1000> nul echo Testing if HD-PVR #1 is working... c:\windows\system32\devcon status "@USB\VID_2040&PID_4901\00A27A22"|find "running" if errorlevel 1 goto RestartServer echo HD-PVR #1 working!!! echo Testing if HD-PVR #2 is working... c:\windows\system32\devcon status "@USB\VID_2040&PID_4901\00A31A44"|find "running" if errorlevel 1 goto RestartServer echo HD-PVR #2 working!!! echo starting SageTV Service... net start SageTV goto End :RestartServer echo What The F... :\windows\system32\devcon reboot goto End :End Exit