diff --git a/05_FormatMedia.cmd b/05_FormatMedia.cmd
index 61c4b13..7592173 100644
--- a/05_FormatMedia.cmd
+++ b/05_FormatMedia.cmd
@@ -44,6 +44,11 @@ set DISK=
goto askdisk
:CONT1
+echo.
+echo IMPORTANT: USE === fat32 === for UEFI systems!
+echo WARNING: DO NOT(!) USE [ exfat ] for UEFI boot!
+echo.
+
set FS=fat32
:askfs
echo.
@@ -55,6 +60,7 @@ set FS=fat32
)
if /i "%FS%" EQU "exfat" (
echo IMPORTANT: some old BIOS versions can't use exfat!
+ echo WARNING: UEFI BIOS can't use exfat for booting!
GOTO CONT2
)
if /i "%FS%" EQU "" (
diff --git a/06_Copy2Media.cmd b/06_Copy2Media.cmd
index 57da1a8..4638325 100644
--- a/06_Copy2Media.cmd
+++ b/06_Copy2Media.cmd
@@ -77,10 +77,6 @@ for %%P in (drivers scripts source optional personal apps custom) do (
)
)
-echo.
-echo deleting ftpsettings.cmd ...
-del /F /Q %DRIVE%\tools\custom\ftpsettings.cmd
-
echo.
echo copying autoconfig starter script to %DRIVE% ...
copy /Y image\StartAutoConfig.cmd %DRIVE%\
@@ -110,6 +106,12 @@ if EXIST %DRIVE%\tools\%SNAPCONTROL_INI% (
tools\searchreplace %DRIVE%\tools\%SNAPCONTROL_INI% "^.*MAILPASS.*=.*" "MailPass = DELETED"
)
+echo.
+echo CLEANUP ...
+del /F /Q %DRIVE%\tools\custom\ftpsettings.cmd
+del /F /Q %DRIVE%\Auto-Saved*.*
+del /F /Q %DRIVE%\NTLite.log
+
echo.
echo ======
echo READY.
diff --git a/image/autounattend_template.xml b/image/autounattend_template.xml
index 2daf84b..ec8525e 100644
--- a/image/autounattend_template.xml
+++ b/image/autounattend_template.xml
@@ -12,50 +12,11 @@
___MYLANG___
-
- OnError
-
-
-
-
- 1
- 128
- Primary
-
-
-
- 2
- Primary
- true
-
-
-
-
-
- 1
- 1
- NTFS
-
- true
-
-
-
- 2
- 2
- C
-
- NTFS
-
-
- 0
- true
-
-
0
- 2
+ 3
OnError
diff --git a/image/finish-boot.cmd b/image/finish-boot.cmd
index 15ec748..9743863 100644
--- a/image/finish-boot.cmd
+++ b/image/finish-boot.cmd
@@ -49,17 +49,25 @@ echo replacing setup.exe with our installer utility ...
copy /Y installer.exe %BOOT%\setup.exe
echo.
-rem prepare unattended xml files ...
-echo copying config file for unattended install [ BIOS ]...
+rem prepare file for unattended installation ...
+echo copying config file for unattended installation ...
copy /Y autounattend_template.xml %BOOT%\autounattend.xml
-rem prepare BIOS version ...
+rem file in users and passwords ...
..\tools\searchreplace %BOOT%\autounattend.xml ___MYUSER___ "%localadmin%"
..\tools\searchreplace %BOOT%\autounattend.xml ___MYNAME___ "%localadmin_name%"
..\tools\searchreplace %BOOT%\autounattend.xml ___MYPASS___ "%localadmin_password%" /S
..\tools\searchreplace %BOOT%\autounattend.xml ___MYLANG___ "%LANG%"
echo.
+echo copying config file for disk format [ BIOS ]...
+copy /Y format-BIOS.txt %BOOT%
+echo copying config file for disk format [ UEFI ]...
+copy /Y format-UEFI.txt %BOOT%
+echo copying disk formatting script ...
+copy /Y format-disk.cmd %BOOT%
+
+rem provide snapshot64.exe ...
if EXIST ..\software\snapshot64_licensed.exe (
echo copying LICENSED snapshot64.exe to boot image ...
copy /Y ..\software\snapshot64_licensed.exe %BOOT%\snapshot64.exe
diff --git a/image/format-disk.cmd b/image/format-disk.cmd
new file mode 100644
index 0000000..17fe091
--- /dev/null
+++ b/image/format-disk.cmd
@@ -0,0 +1,16 @@
+@echo off
+wpeinit && echo INFO: wpeinit OK
+wpeutil UpdateBootInfo > NUL && echo INFO: wpeutil UpdateBootInfo OK
+
+for /f "tokens=2* delims= " %%A in ('reg query HKLM\System\CurrentControlSet\Control /v PEFIRMWAREType') do set FIRMWARE=%%B
+
+if %FIRMWARE%==0x1 (
+ echo FIRMWARE=%FIRMWARE% [BIOS]
+ echo ==========================
+ diskpart /s %SystemDrive%\format-BIOS.txt
+) else (
+ echo FIRMWARE=%FIRMWARE% [UEFI]
+ echo ==========================
+ diskpart /s %SystemDrive%\format-UEFI.txt
+)
+
diff --git a/image/installer.exe b/image/installer.exe
index 2314c5e..eb7af87 100644
Binary files a/image/installer.exe and b/image/installer.exe differ
diff --git a/source/installer.pb b/source/installer.pb
index ff9bd40..3d205de 100644
--- a/source/installer.pb
+++ b/source/installer.pb
@@ -30,9 +30,13 @@ Procedure StartInstallation()
"REALLY DELETE ALL Data on DRIVE [ C: ] ?",
#PB_MessageRequester_YesNo | #PB_MessageRequester_Warning)
- ; start installation ...
If Result = #PB_MessageRequester_Yes
+ ; format disk ...
+ dummy=system(SYS$ + "\windows\system32\cmd.exe /C " + SYS$ + "\format-disk.cmd")
+
+ ; start installation ...
dummy=system(SYS$ + "\winsetup.exe /unattend:" + SYS$ + "\autounattend.xml")
+
End
EndIf
@@ -62,14 +66,14 @@ Procedure StartCMD()
#PB_MessageRequester_Info)
; start a command shell ...
- dummy=system(SYS$ + "\windows\system32\cmd.exe /C start /D "+SYS$+"\ "+SYS$+"\windows\system32\cmd.exe /K wpeutil initializenetwork")
+ dummy=system(SYS$ + "\windows\system32\cmd.exe /C start /D " + SYS$ + "\ " + SYS$ + "\windows\system32\cmd.exe /K wpeutil initializenetwork")
EndProcedure
Procedure StartSnapshot64()
; start backup/restore program ...
- dummy=system(SYS$ + "\windows\system32\cmd.exe /C start /D "+SYS$+"\ "+SYS$+"\snapshot64.exe")
+ dummy=system(SYS$ + "\windows\system32\cmd.exe /C start /D " + SYS$ + "\ " + SYS$ + "\snapshot64.exe")
EndProcedure