This repository has been archived by the owner on May 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pmmpinstaller.bat
67 lines (61 loc) · 1.74 KB
/
pmmpinstaller.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@echo off
:startme
reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | find /i "x86" > NUL && set OS=32BIT || set OS=64BIT
if %OS%==32BIT echo This is a 32bit operating system & goto dl32
if %OS%==64BIT echo This is a 64bit operating system & goto dl64
goto :EOF
:dl32
cls
call :title
:call :downloading
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/NotPocketMine/Windows-PocketMine-MP/blob/master/PocketMine-MP-x86.exe?raw=true', 'PocketMine-MP-x86.exe')"
powershell -Command "Invoke-WebRequest http://www.foo.com/package.zip -OutFile package.zip"
IF EXIST "%cd%/PocketMine-MP-x86.exe" (
start PocketMine-MP-x86.exe
goto downloaded
) ELSE (
goto failure
)
goto :EOF
:dl64
cls
call :title
call :downloading
powershell -Command "(New-Object Net.WebClient).DownloadFile('https://github.com/NotPocketMine/Windows-PocketMine-MP/blob/master/PocketMine-MP-x64.exe?raw=true', 'PocketMine-MP-x64.exe')"
IF EXIST "%cd%/PocketMine-MP-x64.exe" (
start PocketMine-MP-x64.exe
goto downloaded
) ELSE (
goto failure
)
goto :EOF
:downloaded
cls
call :title
echo File has downloaded.
echo it can now be located in "%cd%".
echo.
echo Press any key to exit.
pause >nul
exit
goto :EOF
:downloading
Echo Downloading: Please Wait...
goto :EOF
:failure
cls
call :title
echo Failed to download file.
echo.
echo Possible reasons for error are:
echo - No Internet
echo - Connection interuption
echo - File does not exist.
echo.
echo Press any key to exit.
pause >nul
exit
:title
powershell Write-Host PocketMine-Download-Windows [Version 1.0 - PocketMine-MP] -foregroundcolor "GREEN"
echo (C) 2016 Microsoft Corporation.&echo (C) 2016 PocketMine-MP - PMMP &echo.
goto :EOF