ciwnat

sigma

Aug 22nd, 2025
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.26 KB | None | 0 0
  1. :: Credit @aprllfools on discord
  2.  
  3. @echo off
  4. :: Self-elevate if not running as administrator
  5. net session >nul 2>&1
  6. if %errorlevel% neq 0 (
  7. echo Requesting administrative privileges...
  8. powershell -Command "Start-Process '%~f0' -Verb RunAs"
  9. exit /b
  10. )
  11.  
  12. setlocal EnableDelayedExpansion
  13. title Force Roblox Version to LIVE
  14.  
  15. echo Fetching latest version info...
  16. for /f "usebackq delims=" %%A in (`powershell -NoProfile -Command "$json = (Invoke-WebRequest -Uri 'https://clientsettings.roblox.com/v2/client-version/WindowsPlayer/channel/LIVE').Content | ConvertFrom-Json; $json.clientVersionUpload"`) do (
  17. set "robloxVersion=%%A"
  18. )
  19.  
  20. :: Add error checking for version fetch
  21. if not defined robloxVersion (
  22. echo Failed to get Roblox version info. Report this message to @aprllfools or support.
  23. pause
  24. exit /b 1
  25. )
  26.  
  27. set "version_hash=%robloxVersion:version-=%"
  28.  
  29. echo.
  30. echo Auto-upgrading to: %version_hash%
  31. echo.
  32.  
  33. :: Detect existing installs and prioritize Roblox
  34. set "selected_base_path="
  35. set "selected_name="
  36.  
  37. if exist "%localappdata%\Roblox\Versions" (
  38. set "selected_base_path=%localappdata%\Roblox"
  39. set "selected_name=Roblox (Existing)"
  40. echo Found existing Roblox installation
  41. ) else if exist "%localappdata%\Bloxstrap\Versions" (
  42. set "selected_base_path=%localappdata%\Bloxstrap"
  43. set "selected_name=Bloxstrap (Existing)"
  44. echo Found existing Bloxstrap installation
  45. ) else if exist "%localappdata%\Fishstrap\Versions" (
  46. set "selected_base_path=%localappdata%\Fishstrap"
  47. set "selected_name=Fishstrap (Existing)"
  48. echo Found existing Fishstrap installation
  49. ) else (
  50. set "selected_base_path=%localappdata%\Roblox"
  51. set "selected_name=Roblox (New Install)"
  52. echo No existing installation found, creating new Roblox installation
  53. )
  54.  
  55. echo Using: !selected_name! - !selected_base_path!
  56.  
  57. :: Create directories if they don't exist
  58. set "versions_path=!selected_base_path!\Versions"
  59. if not exist "!selected_base_path!" (
  60. echo Creating directory: !selected_base_path!
  61. mkdir "!selected_base_path!" >nul 2>&1
  62. if %errorlevel% neq 0 (
  63. echo Failed to create directory: !selected_base_path!
  64. pause
  65. exit /b 1
  66. )
  67. )
  68. if not exist "!versions_path!" (
  69. echo Creating versions directory: !versions_path!
  70. mkdir "!versions_path!" >nul 2>&1
  71. if %errorlevel% neq 0 (
  72. echo Failed to create versions directory: !versions_path!
  73. pause
  74. exit /b 1
  75. )
  76. )
  77.  
  78. :: Check and fix Roblox channel
  79. for /f "tokens=1,2,3*" %%A in ('reg query "HKCU\Software\ROBLOX Corporation\Environments\RobloxPlayer\Channel" /v "www.roblox.com" 2^>nul') do (
  80. if /I "%%A"=="www.roblox.com" (
  81. set "channel=%%C"
  82. if /I not "!channel!"=="production" (
  83. set /p "choice=Detected that your Roblox Channel is not production. Do you want to switch to production? (y/n): "
  84. if /I "!choice!"=="y" (
  85. reg add "HKCU\Software\ROBLOX Corporation\Environments\RobloxPlayer\Channel" /v "www.roblox.com" /t REG_SZ /d "production" /f >nul
  86. echo Channel changed to production.
  87. ) else (
  88. echo Skipping channel fix.
  89. )
  90. )
  91. )
  92. )
  93.  
  94. :: Define paths based on selection
  95. set "extract_path=!versions_path!\version-%version_hash%"
  96. set "download_url=https://rdd.weao.xyz/?channel=LIVE^&binaryType=WindowsPlayer^&version=%version_hash%"
  97.  
  98. echo.
  99. echo Downloading version: %version_hash%
  100. echo.
  101.  
  102. start "" %download_url%
  103.  
  104. echo Waiting for download to finish...
  105.  
  106. set "download_folder=%USERPROFILE%\Downloads"
  107. set "zip_filename=WEAO-LIVE-WindowsPlayer-version-%version_hash%.zip"
  108.  
  109. set "timeout_counter=0"
  110. set "timeout_limit=600"
  111.  
  112. :waitForDownload
  113. timeout /t 1 >nul
  114. set /a "timeout_counter+=1"
  115.  
  116. if exist "%download_folder%\%zip_filename%.crdownload" goto waitForDownload
  117. if exist "%download_folder%\%zip_filename%.part" goto waitForDownload
  118. if exist "%download_folder%\%zip_filename%.download" goto waitForDownload
  119. if exist "%download_folder%\%zip_filename%.tmp" goto waitForDownload
  120.  
  121. if exist "%download_folder%\%zip_filename%" goto downloadComplete
  122.  
  123. if %timeout_counter% geq %timeout_limit% (
  124. echo.
  125. echo Download timeout reached after %timeout_limit% seconds.
  126. echo The file was not found in the default download location.
  127. echo.
  128.  
  129. :askDownloadPath
  130. set /p custom_download_folder="Please enter your download folder path (e.g. D:\Downloads): "
  131.  
  132. if not exist "!custom_download_folder!" (
  133. echo The specified folder does not exist. Please try again.
  134. goto askDownloadPath
  135. )
  136.  
  137. set "download_folder=!custom_download_folder!"
  138. echo Checking for download in: !download_folder!
  139.  
  140. if exist "!download_folder!\%zip_filename%" (
  141. echo Found the file in the specified location.
  142. goto downloadComplete
  143. ) else (
  144. echo.
  145. echo File not found in the specified location either, you should contact @aprllfools or support.
  146. pause
  147. exit /b 1
  148. )
  149. )
  150.  
  151. goto waitForDownload
  152.  
  153. :downloadComplete
  154. echo Download found at: %download_folder%\%zip_filename%
  155.  
  156. for %%A in ("%download_folder%\%zip_filename%") do set "size=%%~zA"
  157. echo Download successful (Size: %size% bytes)
  158.  
  159. echo.
  160. echo Removing old versions from !versions_path!...
  161. if exist "!versions_path!\" (
  162. for /d %%d in ("!versions_path!\version-*") do (
  163. if /i not "%%~nxd"=="version-%version_hash%" (
  164. echo Deleting: "%%~fd"
  165. rmdir /s /q "%%d" >nul 2>&1
  166. ) else (
  167. echo Keeping current target version folder: "%%~fd"
  168. )
  169. )
  170. )
  171.  
  172. set "download_zip=%download_folder%\%zip_filename%"
  173.  
  174. :: Extract
  175. echo.
  176. echo Extracting to: !extract_path!
  177. if not exist "!extract_path!" mkdir "!extract_path!" >nul 2>&1
  178.  
  179. :: Check for 7-Zip via registry
  180. for /f "delims=" %%A in ('powershell -NoProfile -Command "Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.DisplayName -like '7-Zip*' } | Select-Object -ExpandProperty InstallLocation"') do (
  181. set "sevenzip=%%A"
  182. )
  183.  
  184. :: Check for WinRAR via registry
  185. for /f "delims=" %%A in ('powershell -NoProfile -Command "Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\* | Where-Object { $_.DisplayName -like 'WinRAR*' } | Select-Object -ExpandProperty InstallLocation"') do (
  186. set "winrar=%%A"
  187. )
  188.  
  189. if defined sevenzip (
  190. echo Found 7-Zip in registry. Extracting...
  191. call "!sevenzip!\7z.exe" x "%download_zip%" -o"!extract_path!" -y
  192. ) else if defined winrar (
  193. echo Found WinRAR in registry. Extracting...
  194. call "!winrar!\WinRAR.exe" x -y "%download_zip%" "!extract_path!\"
  195. ) else (
  196. echo Neither 7-Zip nor WinRAR found in registry. Falling back to PowerShell...
  197. powershell -NoProfile -Command "Expand-Archive -Path '%download_zip%' -DestinationPath '!extract_path!' -Force"
  198. if %errorlevel% neq 0 (
  199. echo Extraction failed. Error code: %errorlevel%
  200. pause
  201. exit /b 1
  202. )
  203. )
  204.  
  205. :: Cleanup downloaded zip
  206. echo Cleaning up temp files...
  207. del "%download_zip%" >nul 2>&1
  208.  
  209. echo.
  210. echo Installation complete to version-%version_hash%
  211. echo Files installed to: !extract_path!
  212. echo Opening versions folder...
  213. explorer "!versions_path!"
  214. pause
  215. exit /b 0
Advertisement
Add Comment
Please, Sign In to add comment