Imthedude025

Auto-Download & Install Optifine via CMD (Batch)

Feb 10th, 2018
55
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :::::::::::::::::::::::::::::::::::::::::::::::
  2. ::Auto-Download & Install Optifine via CMD ::
  3. ::Need an mod update? Discord: D.RU$$#2430 ::
  4. ::Created by RU$$ [http://russdev.mooo.com/] ::
  5. :::::::::::::::::::::::::::::::::::::::::::::::
  6.  
  7. ::File download URL (Dirrect only)
  8. SET URL=http://russdev.mooo.com/extra/1.12.2-OptiFine_HD_U_C8.zip
  9.  
  10. ::Code start
  11. @echo off
  12.  
  13. echo Downloading file to batch dirrectory.
  14. bitsadmin /transfer mydownloadjob /download /priority normal ^ %URL% %~dp0\x.zip
  15.  
  16. echo Extracting file.
  17. powershell.exe -nologo -noprofile -command "& { Add-Type -A 'System.IO.Compression.FileSystem'; [IO.Compression.ZipFile]::ExtractToDirectory('x.zip', 'DownloadedFiles'); }"
  18.  
  19. echo Moving the files out of folder. (If Enabled)
  20. move /Y "%~dp0DownloadedFiles\versions\1.12.2-OptiFine_HD_U_C8" "%appdata%\.minecraft\versions"
  21. move /Y "%~dp0DownloadedFiles\optifine\OptiFine\1.12.2_HD_U_C8" "%appdata%\.minecraft\libraries\optifine\OptiFine"
  22.  
  23. echo Cleaning up files.
  24. del /F /Q "%~dp0\x.zip"
  25. RD /S /Q "%~dp0\DownloadedFiles"
  26.  
  27. cls
  28. echo Job has finished!
  29. pause >nul
  30. exit
RAW Paste Data