Jump to content

Restart Oculus Tool

Hello there, my name is Sebastian and I have created a simple batch file that fixes any Oculus problems like tracking stopping. However, this does NOT fix sound issues with your headset. You would have to unplug and replug your Oculus Headset. This software was built with the Oculus Rift S in mind.

 

This batch file will also echo to a text file named 'oculuslog.txt' in the same destination as the batch file.

 

If you have any questions you may contact me on discord at Sebastian#8637

 

YOU MUST RUN AS AN ADMINISTRATOR.

 

Here is the current code:

@echo off
title Oculus Restart Service - Made by Sebastian#8637
echo Start Launch = %time% %date%>> oculuslog.txt
cls
NET SESSION >nul 2>&1
IF %ERRORLEVEL% EQU 0 (
    cls
    ECHO Administrator PRIVILEGES Detected!
    echo.
) ELSE (
   echo Start Failed = %time% %date%>> oculuslog.txt
   cls
   color 4
   echo. ####################################################
   echo. #						    #
   echo. # ######## ########  ########   #######  ########  #
   echo. # ##       ##     ## ##     ## ##     ## ##     ## #
   echo. # ##       ##     ## ##     ## ##     ## ##     ## #
   echo. # ######   ########  ########  ##     ## ########  #
   echo. # ##       ##   ##   ##   ##   ##     ## ##   ##   #
   echo. # ##       ##    ##  ##    ##  ##     ## ##    ##  #
   echo. # ######## ##     ## ##     ##  #######  ##     ## #
   echo. #						    #
   echo. ####################################################
   echo.
   echo.
   echo.  ERROR: ADMINISTRATOR PRIVILEGES REQUIRED
   echo.
   echo.  This script must be run as administrator to work properly! Without it stuff like logging and restarting services cannot function correctly. 
   echo.
   echo.  If you're seeing this after clicking on a start menu icon, then right click on the shortcut and select "Run As Administrator".
   echo.
   PAUSE
   EXIT /B 1
)
color E
echo Information: This will not fix sound issues, in order to fix sound or mic issues you need to unplug the USB of your Rift and then plug it back in again..
echo.
echo.
pause
cls
:choice
set /P c=Would you like to kill currently running games? [Y/N], Changed your mind? Instead type [CANCEL]
if /I "%c%" EQU "Y" goto :yes
if /I "%c%" EQU "N" goto :skip
if /I "%c%  EQU "cancel" goto :cancel
goto :choice

:cancel
cls
echo ACTION TERMINATED
pause
echo ACTION TERMINATED, Exiting..  = %time% %date%>> oculuslog.txt
exit

:yes
cls
echo Game Process Killing = %time% %date%>> oculuslog.txt
echo Killing currently recognised games.. You are able to add more to this list by editing this batch file.
taskkill /F /IM pavlov.exe>> oculuslog.txt
taskkill /F /IM DoctorWhoTheEdgeOfTime.exe>> oculuslog.txt
taskkill /F /IM UnityCrashHandler64.exe>> oculuslog.txt
taskkill /F /IM BeatSaber.exe>> oculuslog.txt
taskkill /F /IM AssetoCorsa.exe>> oculuslog.txt
taskkill /F /IM acs.exe>> oculuslog.txt
taskkill /F /IM acs_x86.exe>> oculuslog.txt
taskkill /F /IM acShowroom.exe>> oculuslog.txt
taskkill /F /IM BladeandSorcery.exe>> oculuslog.txt
taskkill /F /IM BONEWORKS.exe>> oculuslog.txt
taskkill /F /IM Earth.exe>> oculuslog.txt
taskkill /F /IM crashpad_handler.exe>> oculuslog.txt
taskkill /F /IM CrashReportClient.exe>> oculuslog.txt
taskkill /F /IM UnrealCEFSubProcess.exe>> oculuslog.txt
taskkill /F /IM Recroom_Release.exe>> oculuslog.txt
taskkill /F /IM VRChat.exe>> oculuslog.txt
taskkill /F /IM SteamVR.exe>> oculuslog.txt
Taskkill /F /IM vrwebhelper.exe>> oculuslog.txt
Taskkill /F /IM vrserver.exe>> oculuslog.txt
Taskkill /F /IM vrmonitor.exe>> oculuslog.txt
Taskkill /F /IM vrdashboard.exe>> oculuslog.txt
Taskkill /F /IM vrcompositor.exe>> oculuslog.txt
Taskkill /F /IM steamtours.exe>> oculuslog.txt
Taskkill /F /IM TurnSignal.exe>> oculuslog.txt
Taskkill /F /IM vivelink.exe>> oculuslog.txtv
cls
echo Game Process Finish = %time% %date%>> oculuslog.txt
goto :skip

:skip
cls
echo Runtime Restart Active = %time% %date%>> oculuslog.txt
echo Restarting Oculus Runtime...
net stop OVRService && net start OVRService>> oculuslog.txt
echo Runtime Restart Complete = %time% %date%>> oculuslog.txt
echo Finish Launch = %time% %date%>> oculuslog.txt
echo Exiting..  = %time% %date%>> oculuslog.txt
exit

 

 

Restart_Oculus.bat

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×