Advertisement
skuly

ESO+TTC Launch

Jun 23rd, 2025
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 5.61 KB | Gaming | 0 0
  1. @echo off && SetLocal DisableDelayedExpansion
  2. title Skuly-ESO+TTC Launcher
  3. mode con: cols=52 lines=11
  4. for /f usebackq %%a in (
  5.     `powershell -command "[Environment]::GetFolderPath('Personal')"`
  6. ) do (set "docs_folder=%%a")
  7.  
  8. For /F "delims=" %%G In ('PowerShell -Command "&{((Get-ItemProperty "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Zenimax_Online\Launcher" -Name "InstallPath")."InstallPath")}"') Do Set "ESOPATH=%%G"
  9.  
  10. set PriceTable="%docs_folder%\Elder Scrolls Online\live\AddOns\TamrielTradeCentre"
  11.  
  12. GOTO MENU
  13.  
  14.  
  15. :MENU
  16. cls
  17. COLOR 0A
  18. ECHO 1 - Start ESO Launcher and Update PriceTable NA
  19. ECHO 2 - Start ESO Launcher and Update PriceTable EU
  20. ECHO 3 - Start TTC
  21. ECHO 4 - EXIT
  22.  
  23. ECHO.
  24.  
  25. SET /P M=Type menu number then press ENTER:
  26. IF %M%==1 GOTO STARTLAUNCHERNA
  27. IF %M%==2 GOTO STARTLAUNCHEREU
  28. IF %M%==3 GOTO STARTCLIENT
  29. IF %M%==4 GOTO :EOF
  30.  
  31.  
  32. :CLIENTALREADYSTARTED
  33. echo TCC Client Already Started.
  34. timeout 1 >nul
  35. GOTO MENU
  36.  
  37. :LAUNCHERALREADYSTARTEDNA
  38. echo ESO Launcher Already Started.
  39. timeout 1 >nul
  40. GOTO PRICENA
  41. cls
  42. GOTO MENU
  43.  
  44. :LAUNCHERALREADYSTARTEDEU
  45. echo ESO Launcher Already Started.
  46. timeout 1 >nul
  47. GOTO PRICEEU
  48. cls
  49. GOTO MENU
  50.  
  51. :STARTCLIENT
  52. cls
  53. For /F "delims=" %%G In ('PowerShell -Command "&{((Get-Process client).Path)}"') Do Set "readclienttaskpath=%%G"
  54.  
  55. SET SearchString=Elder Scrolls Online
  56. SetLocal EnableDelayedExpansion
  57. If /I Not "%readclienttaskpath%"=="!readclienttaskpath:%SearchString%=!" (GOTO CLIENTALREADYSTARTED) Else GOTO STARTCLIENTMAIN
  58. EndLocal
  59. cls
  60.  
  61. :STARTCLIENTMAIN
  62. cls
  63. set clientpath="%docs_folder%\Elder Scrolls Online\live\AddOns\TamrielTradeCentre\Client\Client.exe"
  64. start "" %clientpath%
  65. timeout 1 >nul
  66. For /F "delims=" %%G In ('PowerShell -Command "&{((Get-Process client).Path)}"') Do Set "readclienttaskpath=%%G"
  67.  
  68. SET SearchString=Elder Scrolls Online
  69. SetLocal EnableDelayedExpansion
  70. If /I Not "%readclienttaskpath%"=="!readclienttaskpath:%SearchString%=!" (echo TTC Client is now Started. && timeout 1 >nul && GOTO MENU) Else GOTO STARTCLIENTFAILED
  71. EndLocal
  72.  
  73. :: NA
  74.  
  75. :STARTLAUNCHERNA
  76. cls
  77. timeout 1 >nul
  78. For /F "delims=" %%G In ('PowerShell -Command "&{((Get-Process Bethesda.net_Launcher).Path)}"') Do Set "launchertaskpath=%%G"
  79.  
  80. SET SearchString=%ESOPATH%
  81. SetLocal EnableDelayedExpansion
  82. If /I Not "%launchertaskpath%"=="!launchertaskpath:%SearchString%=!" (GOTO LAUNCHERALREADYSTARTEDNA) Else GOTO STARTLAUNCHERMAINNA
  83. EndLocal
  84.  
  85.  
  86. :STARTLAUNCHERMAINNA
  87. setlocal EnableDelayedExpansion
  88.  
  89. :: Path to the launcher
  90. set "launcherpath=%ESOPATH%\Launcher\Bethesda.net_Launcher.exe"
  91.  
  92. :: Launch the ESO Launcher
  93. start "" "%launcherpath%"
  94. cls
  95.  
  96. :: Try to detect the running process up to 5 times
  97. set "retry=0"
  98. set "maxRetries=5"
  99. set "launchertaskpath="
  100.  
  101. :DETECT_LOOP
  102. timeout /t 1 >nul
  103. For /F "delims=" %%G In ('PowerShell -Command "&{try {(Get-Process Bethesda.net_Launcher).Path} catch {}}"') Do Set "launchertaskpath=%%G"
  104.  
  105. :: Check if the launcher task path contains the expected base path
  106. if /I not "!launchertaskpath!"=="!launchertaskpath:%ESOPATH%=!" (
  107.     echo ESO Launcher successfully started.
  108.     timeout /t 1 >nul
  109.     goto PRICENA
  110. )
  111.  
  112. :: Retry logic
  113. set /a retry+=1
  114. if !retry! lss %maxRetries% (
  115.     goto DETECT_LOOP
  116. ) else (
  117.     echo Launcher process not found or path mismatch after %maxRetries% attempts.
  118.     goto STARTLAUNCHERFAILEDNA
  119. )
  120.  
  121. endlocal
  122.  
  123.  
  124. :: NA END
  125.  
  126. :: EU
  127.  
  128. :STARTLAUNCHEREU
  129. cls
  130. timeout 1 >nul
  131. For /F "delims=" %%G In ('PowerShell -Command "&{((Get-Process Bethesda.net_Launcher).Path)}"') Do Set "launchertaskpath=%%G"
  132.  
  133. SET SearchString=%ESOPATH%
  134. SetLocal EnableDelayedExpansion
  135. If /I Not "%launchertaskpath%"=="!launchertaskpath:%SearchString%=!" (GOTO LAUNCHERALREADYSTARTEDEU) Else GOTO STARTLAUNCHERMAINEU
  136. EndLocal
  137.  
  138.  
  139. :STARTLAUNCHERMAINEU
  140. setlocal EnableDelayedExpansion
  141.  
  142. :: Path to the launcher
  143. set "launcherpath=%ESOPATH%\Launcher\Bethesda.net_Launcher.exe"
  144.  
  145. :: Launch the ESO Launcher
  146. start "" "%launcherpath%"
  147. cls
  148.  
  149. :: Try to detect the running process up to 5 times
  150. set "retry=0"
  151. set "maxRetries=5"
  152. set "launchertaskpath="
  153.  
  154. :DETECT_LOOP
  155. timeout /t 1 >nul
  156. For /F "delims=" %%G In ('PowerShell -Command "&{try {(Get-Process Bethesda.net_Launcher).Path} catch {}}"') Do Set "launchertaskpath=%%G"
  157.  
  158. :: Check if the launcher task path contains the expected base path
  159. if /I not "!launchertaskpath!"=="!launchertaskpath:%ESOPATH%=!" (
  160.     echo ESO Launcher successfully started.
  161.     timeout /t 1 >nul
  162.     goto PRICEEU
  163. )
  164.  
  165. :: Retry logic
  166. set /a retry+=1
  167. if !retry! lss %maxRetries% (
  168.     goto DETECT_LOOP
  169. ) else (
  170.     echo Launcher process not found or path mismatch after %maxRetries% attempts.
  171.     goto STARTLAUNCHERFAILEDEU
  172. )
  173.  
  174. endlocal
  175.  
  176.  
  177. :: EU END
  178.  
  179. :STARTLAUNCHERFAILEDNA
  180. echo Failed to Start ESO Launcher.
  181. timeout 1 >nul
  182. GOTO PRICENA
  183.  
  184. :STARTLAUNCHERFAILEDEU
  185. echo Failed to Start ESO Launcher.
  186. timeout 1 >nul
  187. GOTO PRICEEU
  188.  
  189.  
  190.  
  191. :STARTCLIENTFAILED
  192. echo Failed to Start TTC Client. Is your Client.exe located in the Documents\Elder Scrolls Online\live\AddOns\TamrielTradeCentre\Client\ Folder?
  193. timeout 1 >nul
  194. GOTO MENU
  195.  
  196. :PRICENA
  197. cls
  198. IF EXIST %PriceTable%\PriceTableEU.lua DEL %PriceTable%\PriceTableEU.lua
  199. curl -s -o "PriceTable.zip " https://us.tamrieltradecentre.com/download/PriceTable
  200. tar -xf PriceTable.zip -C %PriceTable% && echo PriceTableNA Updated
  201. del PriceTable.zip
  202. timeout 1 >nul
  203. GOTO MENU
  204.  
  205. :PRICEEU
  206. cls
  207. IF EXIST %PriceTable%\PriceTableNA.lua DEL %PriceTable%\PriceTableNA.lua
  208. curl -s -o "PriceTable.zip " https://eu.tamrieltradecentre.com/download/PriceTable
  209. tar -xf PriceTable.zip -C %PriceTable% && echo PriceTableEU Updated
  210. del PriceTable.zip
  211. timeout 1 >nul
  212. GOTO MENU
  213. :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement