Last active
June 11, 2019 00:08
-
-
Save Bluscream/88135009829dbd140d285428507d71bf to your computer and use it in GitHub Desktop.
VRChat Repair Script
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
:START | |
@echo off | |
title VRChat Repair Script [Started %date% - %time%] | |
chcp 65001 | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
call :HEADER | |
FOR /F "tokens=2 delims==" %%a IN ('wmic os get OSLanguage /Value') DO set oslang=%%a | |
REM set oslang=1032 | |
IF %oslang% EQU 1031 ( | |
echo Erkannte Sprache: Deutsch - Deutschland ^(%oslang%^) | |
set str_deletedir_delete=Lösche & set str_failed=Fehlgeschlagen! & set str_success=Erfolgreich & set str_notexist=Existiert nicht & set str_step=Schritt | |
set str_step_finished=Schritt erfolgreich ausgeführt, bitte versuche das Spiel zu starten und schau nach ob die Probleme behoben wurden! | |
set str_clearcache_notexist=Konfigurationsordner existiert nicht, Schritt wird übersprungen... | |
set str_clearcache_step=Von VRChat zwischengespeicherte Daten löschen & set str_clearcache_preview=Folgende Ordner werden gelöscht: | |
set str_pause=Drücke eine beliebige Taste um fortzufahren | |
set str_clearregistry_step=VRChat Registry einträge löschen & set str_clearregistry_preview=Folgende Einträge werden gelöscht: | |
set str_disableconfig_step=Konfigurationsdatei deaktivieren & set str_disableconfig_notice=config.json deaktivieren (in config.bak.json umbennen) um es als Ursache für mögliche Probleme auszuschließen | |
set str_disableconfig_notexist=Konfigurationsdatei existiert nicht, Schritt wird übersprungen... | |
set str_platform_ask=Über welche Platform hast du das Spiel installiert? ^(S^)team, ^(O^)culus oder ^(N^)ichts davon | |
set str_platform_steam_verify_step=Spieldateien von Steam überprüfen lassen | |
set str_platform_steam_verify_notice=Falls Modloader o.Ä. installiert sind werden diese mit diesem Schritt deinstalliert und müssen erneut installiert werden! | |
set str_end=Alle Reperaturen wurden ausgeführt, falls immernoch Probleme mit dem Spiel bestehen und diese nicht auf Mods zurückzuführen sind, bitte den offiziellen Support kontaktieren. | |
) ELSE ( | |
echo Detected language: Other - Using en-US ^(%oslang%^) | |
set str_deletedir_delete=Deleting & set str_failed=Failed! & set str_success=Success & set str_notexist=Does not exist & set str_step=Step | |
set str_clearcache_step=Delete VRChat cache ^(worlds, avatars, cookies, etc.^) & set str_clearcache_preview=Following directories will get deleted: | |
set str_clearcache_notexist=Configuration directy does not exist, skipping step... | |
set str_pause=Press any key to continue | |
set str_clearregistry_step=Clear VRChat Registry & set str_clearregistry_preview=Following entries will get deleted: | |
set str_disableconfig_step=Disable config & set str_disableconfig_notice=disable config.json (rename into config.bak.json) to make sure it isn't causing any problems | |
set str_disableconfig_notexist=Config file does not exist, skipping step... | |
set str_platform_ask=Which version of the game do you use? ^(S^)team, ^(O^)culus or ^(N^)othing from this list | |
set str_platform_steam_verify_step=Repair game files with Steam | |
set str_platform_steam_verify_notice=If modloaders are present, this step will uninstall them and they will need to be reinstalled manually afterwards | |
set str_end=All repairs done, if your game is still having problems and they are not caused by third-party modifications, please contact official support. | |
) | |
set str_end_contact=Discord: https://discord.gg/vrchat Web: http://help.vrchat.com/new E-Mail: support@vrchat.com | |
set /A step=0 | |
set /A platform=0 | |
set configdir=%AppData%\..\LocalLow\VRChat\vrchat\ | |
:PLATFORM | |
CHOICE /N /C:SON /M "%str_platform_ask%" | |
if %ERRORLEVEL% EQU 1 ( | |
set /A platform=1 | |
) else if %ERRORLEVEL% EQU 2 ( | |
set /A platform=2 | |
) | |
:CLEARCACHE | |
set /A step=%step%+1 | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
set to_clean=%TEMP%\VRChat;%configdir%Cookies\;%configdir%HTTPCache\;%configdir%HTTPCache-WindowsPlayer\;%configdir%Unity\;%configdir%VRCHTTPCache\ | |
echo. | |
if exist "%configdir%" ( | |
echo %str_step% %step%: %str_clearcache_step% | |
echo %str_clearcache_preview% | |
call :PrintItems %to_clean% | |
pause | |
for %%a in (%to_clean%) do ( | |
call :DeleteDir %%a | |
) | |
) else ( | |
echo %str_clearcache_notexist% | |
) | |
endlocal | |
:CLEARREGISTRY | |
set /A step=step+1 | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
set to_clean=HKCU\Software\VRChat\vrchat | |
echo. | |
echo %str_step% %step%: %str_clearregistry_step% | |
echo %str_clearregistry_preview% | |
call :PrintItems %to_clean% | |
pause | |
for %%a in (%to_clean%) do ( | |
REG DELETE %%a /va /f | |
) | |
endlocal | |
:STEAM_VERIFY | |
set /A step=step+1 | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
if %platform% EQU 1 ( | |
echo. | |
echo %str_step% %step%: %str_platform_steam_verify_step% | |
echo %str_platform_steam_verify_notice% | |
pause | |
start "" steam://validate/438100 | |
) | |
endlocal | |
:DISABLECONFIG | |
set /A step=step+1 | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
set config_file=%configdir%config.json | |
echo. | |
if exist "%config_file%" ( | |
echo %str_step% %step%: %str_disableconfig_step% | |
echo %str_disableconfig_notice% | |
pause | |
) ELSE ( | |
echo %str_disableconfig_notexist% | |
) | |
endlocal | |
:END | |
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION | |
echo. | |
echo %str_end% | |
echo %str_end_contact% | |
pause | |
endlocal | |
exit /b | |
REM Common functions | |
:PAUSE | |
( | |
echo ^> %pause%... | |
pause >nul | |
) | |
goto :eof | |
:PrintItems | |
( | |
for %%a in (%*) do ( | |
echo - %%a | |
) | |
) | |
goto :eof | |
:DeleteDir | |
( | |
echo| set /p="%str_deletedir_delete%%~1 ... " | |
if not exist "%~1" ( | |
echo %str_notexist% | |
) else ( | |
rmdir /S /Q "%~1" 2>nul & If exist "%~1" ( | |
echo %str_failed% | |
) else ( | |
echo %str_success% | |
) | |
) | |
) | |
goto :eof | |
:HEADER | |
( | |
cls | |
echo =============== VRChat Repair Script by Bluscream ================ | |
echo https://gist.github.com/Bluscream/88135009829dbd140d285428507d71bf | |
echo ================================================================== | |
) | |
goto :eof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment