Skip to content

Commit 773c5de

Browse files
Release 1.0 (R1)
ChangeLogs included in README.TXT
1 parent 9a25692 commit 773c5de

File tree

2 files changed

+18
-15
lines changed

2 files changed

+18
-15
lines changed

Installer.cmd

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
@echo off
2+
setlocal EnableExtensions
3+
setlocal
24
if not "%~1"=="" call :%~1
35
if %Errorlevel% NEQ 0 goto :EOF
46
:Check1
@@ -11,7 +13,7 @@ if EXIST M:\ (
1113
echo ----------------------------------------------------------------
1214
echo Please Unmount Drive [M:]
1315
pause
14-
exit
16+
exit /B
1517
)
1618
echo - Checking Drive [N:] ...
1719
if EXIST N:\ (
@@ -20,7 +22,7 @@ if EXIST N:\ (
2022
echo ----------------------------------------------------------------
2123
echo Please Unmount Drive [N:]
2224
pause
23-
exit
25+
exit /B
2426
)
2527
::---------------------------------------------------------------
2628
:GetAdministrator
@@ -59,7 +61,7 @@ if %WinBuild% LSS 9600 (
5961
echo Please use Windows 8.1+ Pro or Enterprise ^(Build 9600+^)
6062
echo Current OS build: %WinBuild%
6163
pause
62-
exit
64+
exit /B
6365
)
6466

6567
echo - Checking Windows Powershell ...
@@ -73,7 +75,7 @@ if %PLV% NEQ 0 (
7375
echo Please enable Powershell and continue.
7476
echo Error code: %PLV%
7577
pause
76-
exit
78+
exit /B
7779
)
7880
echo - Checking Dism ...
7981
where DISM >nul
@@ -83,7 +85,7 @@ if %errorlevel% NEQ 0 (
8385
echo ----------------------------------------------------------------
8486
echo DISM isn't found or it has problem.
8587
pause
86-
exit
88+
exit /B
8789
)
8890
echo - Checking Bcdedit ...
8991
where bcdedit >nul
@@ -93,7 +95,7 @@ if %errorlevel% NEQ 0 (
9395
echo ----------------------------------------------------------------
9496
echo BCDEDIT wasn't found or it has problem.
9597
PAUSE
96-
EXIT
98+
exit /B
9799
)
98100

99101
echo - Checking Hyper-V ...
@@ -104,7 +106,7 @@ if %errorlevel% NEQ 0 (
104106
echo ----------------------------------------------------------------
105107
echo Please enable Hyper-V in Windows Features.
106108
pause
107-
exit
109+
exit /B
108110
)
109111
echo - Getting CmdLets ...
110112
Powershell -C "(Get-Command).name" >> Commands.txt
@@ -142,15 +144,15 @@ echo ----------------------------------------------------------------
142144
echo You used Windows 7 / Windows Home edition / Customized Windows.
143145
echo Please use Official Windows 8.1 Pro or Windows 10 Pro
144146
pause
145-
exit
147+
exit /B
146148
:MissingCommandHyperV
147149
del Commands.txt
148150
title ERROR!
149151
color 0C
150152
echo ----------------------------------------------------------------
151153
echo Hyper-V is not fully enabled or not enabled correctly.
152154
pause
153-
exit
155+
exit /B
154156

155157

156158
:ToBeContinued0
@@ -200,7 +202,7 @@ echo // %ESC%[97mby RedGreenBlue123%ESC%[93m
200202
echo // %ESC%[97mThanks to: @Gus33000, @FadilFadz01, @Heathcliff74%ESC%[93m //
201203
echo //////////////////////////////////////////////////////////////////////////////////////////////%ESC%[0m
202204
echo.
203-
echo %ESC%[92mChoose your Device Model below:
205+
echo %ESC%[92mChoose your device model below:
204206
echo %ESC%[36m1) %ESC%[97mLumia 930
205207
echo %ESC%[36m2) %ESC%[97mLumia 929 (Icon)
206208
echo %ESC%[36m3) %ESC%[97mLumia 1520
@@ -358,13 +360,13 @@ if %Storage%==32 (
358360
)
359361
echo.
360362
echo %ESC%[96m[INFO] Creating Partition Table ...%ESC%[91m
361-
Powershell -C "Mount-VHD -Path %MainOS%\Data\windows10arm.vhdx; exit $Error.count" %SevLogger%
363+
Powershell -C "Mount-VHD -Path %MainOS%\Data\windows10arm.vhdx; exit /B $Error.count" %SevLogger%
362364
Powershell -C "Initialize-Disk -Number (Get-VHD -Path %MainOS%\Data\windows10arm.vhdx).DiskNumber -PartitionStyle GPT -confirm:$false; exit $Error.count" %SevLogger%
363365
:: Create ESP
364366
echo.
365367
echo %ESC%[96m[INFO] Creating EFI System Partition ...%ESC%[91m
366368
Powershell -C "New-Partition -DiskNumber (Get-VHD -Path %MainOS%\Data\windows10arm.vhdx).DiskNumber -GptType '{c12a7328-f81f-11d2-ba4b-00a0c93ec93b}' -Size 100MB -DriveLetter M; exit $Error.count" %SevLogger%
367-
Powershell -C "Format-Volume -DriveLetter M -FileSystem Fat32 -NewFileSystemLabel "ESP" -confirm:$false; exit $Error.count" %SevLogger%
369+
Powershell -C "Format-Volume -DriveLetter M -FileSystem Fat32 -NewFileSystemLabel "ESP" -confirm:$false; exit /B $Error.count" %SevLogger%
368370
:: Create MSR
369371
echo.
370372
echo %ESC%[96m[INFO] Creating Microsoft Reserved Partition ...%ESC%[91m
@@ -474,7 +476,7 @@ echo %ESC%[96m[INFO] Installation is cancelled because a%ESC%[91m severe error %
474476
echo %ESC%[33m[WARN] Please check installation log in Logs folder.%ESC%[0m
475477
echo.
476478
pause
477-
exit
479+
exit /B
478480

479481
:MissionCompleted
480482
if %ErrNum% GTR 0 (
@@ -496,4 +498,4 @@ echo - Run PostInstall.bat.
496498
echo ================================================================================================%ESC%[0m
497499
echo.
498500
pause
499-
exit
501+
exit /b

README.TXT

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ CHANGELOGS:
8888
+ Fixed Installer & Driver Downloader crashes when user enters: & ; ^ > < , | (Preview 1 & 3)
8989
+ Renamed Installer from Bat to Cmd for correct Errorlevel check (Preview 1)
9090
+ Reduced Installer & Driver Downloader size (Preview 3)
91-
+ Minor fixes
91+
+ Use exit from batch instead of exit cmd (Final)
92+
+ Minor changes
9293
*KNOWN ISSUES:
9394
+ Installer & Driver Downloader crashes when user enter "
9495
- Try and tell me :)

0 commit comments

Comments
 (0)