Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- echo Download this script from http://pitek.planetbeast.net:8030/
- @echo Off
- IF EXIST "%UserProfile%\pitek.jar" (
- call:startPiTek
- GOTO:EOF
- ) else (
- call:trySimpleDownload
- call:checkStart
- )
- GOTO:EOF
- :trySimpleDownload
- IF EXIST "C:\Windows\System32\bitsadmin.exe" (
- "C:\Windows\System32\bitsadmin.exe" /transfer "PiTekDownloader" http://pitek.planetbeast.net:8030/launcher.jar "%UserProfile%\pitek.jar"
- CLS
- )
- GOTO:EOF
- :checkStart
- IF EXIST "%UserProfile%\pitek.jar" (
- call:startPiTek
- ) ELSE (
- call:longDownload
- CLS
- "C:\Windows\System32\bitsadmin.exe" /reset
- CLS
- call:startPiTek
- )
- GOTO:EOF
- :longDownload
- IF EXIST "C:\Windows\System32\bitsadmin.exe" (
- "C:\Windows\System32\bitsadmin.exe" /create "PiTekDownloader"
- "C:\Windows\System32\bitsadmin.exe" /addfile "PiTekDownloader" http://pitek.planetbeast.net:8030/launcher.jar "%UserProfile%\pitek.jar"
- "C:\Windows\System32\bitsadmin.exe" /resume "PiTekDownloader"
- CLS
- call:waitForDownload
- )
- GOTO:EOF
- :waitForDownload
- "C:\Windows\System32\ping.exe" 127.0.0.1 -n 2 > nul
- for /f %%i in ('C:\Windows\System32\bitsadmin.exe /GetState PiTekDownloader') do set downloadStatus=%%i
- IF %downloadStatus%==TRANSFERRED (
- "C:\Windows\System32\bitsadmin.exe" /complete "PiTekDownloader"
- GOTO:EOF
- )
- CLS
- "C:\Windows\System32\bitsadmin.exe" /info "PiTekDownloader"
- call:waitForDownload
- GOTO:EOF
- :startPiTek
- IF EXIST "%UserProfile%\pitek.jar" (
- IF EXIST "C:\Program Files\Java\jre7\bin\javaw.exe" (
- @echo On
- echo This window will automatically close when Minecraft starts.
- echo Please do not manually close this window.
- echo Starting PiTek custom launcher...
- @echo Off
- "C:\Program Files\Java\jre7\bin\javaw.exe" -Xms512M -Xmx1G -jar "%UserProfile%\pitek.jar"
- GOTO:EOF
- ) ELSE (
- @echo On
- echo Please download and install java!
- echo ----------------------------------
- echo If you already have java installed
- echo make sure you're running 64 bit java
- pause
- GOTO:EOF
- )
- )
- GOTO:EOF
- :manualDownload
- @echo On
- echo Please manually download the PiTek launcher
- echo from http://pitek.planetbeast.net:8030/
- echo and place it in C:\Users\yourusername\
- pause
- GOTO:EOF
Advertisement
Add Comment
Please, Sign In to add comment