Advertisement
aveyo

Dota2_export_to_test_client

Dec 11th, 2016
1,152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.69 KB | None | 0 0
  1. @echo off &TITLE  Dota 2 - export settings to Test Client by AveYo
  2. setlocal &call :set_game_profile
  3. if not defined profile echo Error! Cannot find Dota 2 user profile &pause &exit /b
  4.  
  5. :: dota 2 beta\game\dota\cfg > dota 2 test\game\dota\cfg
  6. xcopy /E/C/I/Q/H/R/K/Y/Z "%game%\dota\cfg\*.*" "%game_t%\dota\cfg\" >nul 2>nul
  7. :: 570\remote > 205790\remote
  8. xcopy /E/C/I/Q/H/R/K/Y/Z "%profile%\570\remote\*.*" "%profile%\205790\remote\" >nul 2>nul
  9.  
  10. echo  DONE! &ping localhost >nul 2>&1 &endlocal &exit /b
  11. :set_game_profile
  12. for /f "usebackq tokens=2* delims=_" %%A in (`reg query "HKCU\SOFTWARE\Valve\Steam" 2^>nul ^| find /i "SteamPath"`) do set "steampath=%%~A"
  13. set "steampath=%steampath:~6%" &set "libfilter=LibraryFolders { TimeNextStatsReport ContentStatsID }"
  14. for /f usebackq^ delims^=^"^ tokens^=4 %%A in (`findstr /v "%libfilter%" "%steampath%\SteamApps\libraryfolders.vdf"`) do (
  15. if exist "%%A\steamapps\appmanifest_205790.acf" if exist "%%A\steamapps\common\dota 2 test\game\dota\maps\dota.vpk" set "libpath_t=%%A"
  16. if exist "%%A\steamapps\appmanifest_570.acf" if exist "%%A\steamapps\common\dota 2 beta\game\dota\maps\dota.vpk" set "libpath=%%A")
  17. if defined libpath_t (set "game_t=%libpath_t%\steamapps\common\dota 2 test\game") else set "game_t=%steampath%\steamapps\common\dota 2 test\game"
  18. if defined libpath (set "game=%libpath%\steamapps\common\dota 2 beta\game") else set "game=%steampath%\steamapps\common\dota 2 beta\game"
  19. cd /d "%game%\dota\" >nul 2>&1
  20. for /f delims^=^ eol^= %%b in ('dir /a:-d /b /o:d /t:w cache_*.soc 2^>nul') do set "usercache=%%~nb"
  21. set "profile=%steampath%\userdata\%usercache:cache_=%"
  22. if exist "%profile%\config\localconfig.vdf" goto :eof
  23. set "profile="
  24. endlocal &goto :eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement