SHARE
TWEET

Auto-Download & Install Any Optifine via CMD WH List GUI!

Imthedude025 Feb 14th, 2018 (edited) 45 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  2. ::Auto-Download & Install Any Optifine via CMD W/H List GUI! ::
  3. ::Need an mod update? Discord: D.RU$$#2430                   ::
  4. ::Created by RU$$ [http://russdev.mooo.com/]                 ::
  5. :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  6. @echo off
  7. title Auto-Download & Install Any Optifine via CMD W/H List GUI!
  8. mode con: cols=51 lines=50
  9.  
  10. REM Updating files | Downloading file to batch dirrectory.
  11. bitsadmin /transfer mydownloadjob /download /priority normal ^ http://russdev.mooo.com/extra/core.zip %~dp0\x.zip
  12.  
  13. REM Extracting files
  14. powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('x.zip', 'DownloadedFiles'); }"
  15.  
  16. echo Update complete!
  17.  
  18. :MENU
  19. ::GUI menu + Read file options
  20. cls
  21. cd "%~dp0"
  22.  
  23. echo ==================================================
  24. echo = INFO: Change CMDs "Screen Buffer Size" to 500+ =
  25. echo ==================================================
  26. echo = Commands:                                      =
  27. echo =                                                =
  28. echo = Exit - Exit's CMD                              =
  29. echo ==================================================
  30. echo = Mod list:                                      =
  31. echo ==================================================
  32. for /f "tokens=* delims=" %%x in (DownloadedFiles\modlist.txt) do echo %%x
  33. for /f "delims== tokens=1,2" %%G in (DownloadedFiles\sourcelist.txt) do set %%G=%%H
  34. echo ==================================================
  35.  
  36. echo.
  37. set option=
  38. echo.
  39. set /p option=Select an download:
  40. if '%option%'=='exit' goto :EXIT
  41. if '%option%'=='Exit' goto :EXIT
  42. if '%option%'=='' goto :MENU else goto :Start
  43.  
  44. :Start
  45. ::Combine variables
  46. setlocal EnableDelayedExpansion
  47.  
  48. set var1=FILE
  49. set var2=%option%
  50.  
  51. set newvar1=!%var1%%var2%!
  52.  
  53. ::Code start
  54.  
  55. echo Downloading file to batch dirrectory.
  56. bitsadmin /transfer mydownloadjob /download /priority normal ^ %newvar1% %~dp0\z.zip
  57.  
  58. echo Extracting file.
  59. powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('z.zip', 'DownloadedFiles'); }"
  60.  
  61. echo Moving the files out of folder. (If Enabled)
  62. ROBOCOPY "%~dp0DownloadedFiles\versions" "%appdata%\.minecraft\versions" /MOVE /E /NJH /NJS /NDL /NFL /NC /NS
  63. ROBOCOPY "%~dp0DownloadedFiles\optifine" "%appdata%\.minecraft\libraries\optifine" /MOVE /E /NJH /NJS /NDL /NFL /NC /NS
  64.  
  65. echo Cleaning up files.
  66. del /F /Q "%~dp0\x.zip"
  67. del /F /Q "%~dp0\z.zip"
  68. RD /S /Q "%~dp0\DownloadedFiles"
  69.  
  70. cls
  71. echo Job has finished!
  72. pause >nul
  73. exit
  74.  
  75. :EXIT
  76. cls
  77. del /F /Q "%~dp0\x.zip"
  78. del /F /Q "%~dp0\z.zip"
  79. RD /S /Q "%~dp0\DownloadedFiles"
  80.  
  81. exit
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top