New
#241
Creating an iso from a win 7 PT-BR it didn't find boot\en-us\bootsect.exe.mui (listed in bootorder.txt) as it has boot\PT-BR\bootsect.exe.mui.
Is there a way to look for boot\*\bootsect.exe.mui?
You could do a text substitution using gsar.exe. (gsar.exe is already in the BIN folder )
If bootorder.txt contains the line boot\en-US\bootsect.exe.mui
you can change it to the wim language using something like this:
Alternatively, you could write the bootorder.txt from 7updater.cmd file, after finding the language of the wim.Code:for /f "tokens=3 delims=: " %%i in ('bin\wimlib-imagex.exe info "%WIMDir%\sources\install.wim" 1 ^| find /i "Default"') do set wimlang=%%i echo. rem check it - use $ each side of variable to check we aren't picking up any spaces echo. echo wim language is $%wimlang%$ echo. pause "BIN\gsar" -b -o -sen-US -r%wimlang% "BIN\bootorder.txt" pause rem have a look at bootorder.txt to see if has changed properly notepad "BIN\bootorder.txt" pause rem to reset bootorder to original after creating iso. "BIN\gsar" -b -o -s%wimlang% -ren-US "BIN\bootorder.txt"
Last edited by SIW2; 17 Apr 2019 at 23:40.
I inserted a the modified string on Create-iso.cmd
Instead of modify the original BIN\bootorder.txt, I made a copy to the a temp folder, change language and used Temp\bootorder.txt, the on :CreateIso%WIMARCH%
Had to add -i to the string (in bootorder.txt is en-us)
"BIN\gsar" -b -i -o -sen-US -r%wimlang% "Temp\bootorder.txt"
Thanks
On the main script you have
::for /f "tokens=1,2 delims=- skip=1" %%a in ('bin\ConvertDateHex.exe /d%ndat% /t22:26:11') Do set "HP=%%a"& set "LP=%%b"
Is :: always Rem or it can be a cmd?
You extract data from UpdatePack7R2-*.exe
for /f "tokens=1-2 delims=-" %%a in ('dir /b /a-d "%Simplix%\UpdatePack7R2-*.exe"') do set dat=%%~nb & set PACKNAM="%Simplix%\%%a-%%b"
set "mes=%dat:~3,2%" & set "den=%dat:~6,2%"
if "%mes:~1,1%"=="." (set "mes=0%dat:~3,1%"& set den=%dat:~5,2%)
set "ndat=%den%.%mes%.20%dat:~0,2%"
Then in
:home
REM if not updatepack date use current date
IF %hp% NEQ 0 ( GOTO :NEXTHOME )
for /f "tokens=1,2 delims=- skip=1" %%a in ('bin\ConvertDateHex.exe /C') Do set "HP=%%a"& set "LP=%%b"
echo.
Can you please explain, in English, what you do?
The purpose is to change the date that shows when installing. It is not essential, but helps to know when you updated it, and is good cosmetically.
It is complicated because the date is stored in the wim information in hex format in two parts Highpart and Lowpart.
Therefore we want to get those two values HP and LP in the correct format ( using Convertdate.exe ), then write that information to the wim file ( using wimlib)
1.That is to use the date from the Simplix update pack.Code:for /f "tokens=1,2 delims=- skip=1" %%a in ('bin\ConvertDateHex.exe /d%ndat% /t22:26:11') Do set "HP=%%a"& set "LP=%%b"
For example if you have UpdatePack7R2-19.4.10.exe:
the code /d%ndat% passes date 10.04.19 to converthexdate.exe.
(The updatepack doesn't have a time, so we just use /t22:26:11)
First,we need to grab the date 19.4.10 off UpdatePack7R2-19.4.10.exe.
Then do some string manipulation to feed 19.4.10 to converdatehex.exe as 10.04.2019
%den% is 10Code:You extract data from UpdatePack7R2-*.exe for /f "tokens=1-2 delims=-" %%a in ('dir /b /a-d "%Simplix%\UpdatePack7R2-*.exe"') do set dat=%%~nb & set PACKNAM="%Simplix%\%%a-%%b" set "mes=%dat:~3,2%" & set "den=%dat:~6,2%" if "%mes:~1,1%"=="." (set "mes=0%dat:~3,1%"& set den=%dat:~5,2%) set "ndat=%den%.%mes%.20%dat:~0,2%" for /f "tokens=1,2 delims=- skip=1" %%a in ('bin\ConvertDateHex.exe /d%ndat% /t22:26:11') Do set "HP=%%a"& set "LP=%%b"
%mes% is 04
%dat% is 19.4.10
"ndat=%den%.%mes%.20%dat:~0,2%" means %ndat% is 10.04.2019
2. But if you want to use the current date and time instead of the simplix pack date, it is much easier:
for /f "tokens=1,2 delims=- skip=1" %%a in ('bin\ConvertDateHex.exe /C') Do set "HP=%%a"& set "LP=%%b"
That is how we get the hex values for the HP (highpart) and LP (lowpart) .
3. Wimlib is then used to write those HP and LP values to the wim xml information
Code:wimlib-imagex.exe info "%wimdir%\sources\install.wim" %INDNO% --image-property CREATIONTIME/HIGHPART=%hp% --image-property CREATIONTIME/LOWPART=%lp%
WIMlib-imagex info command
Last edited by SIW2; 18 Apr 2019 at 16:08.
Converthexdate.exe was created by Sergey Tkachenko
Usage:
Code:This utility converts a date and time in hexadecimal format. It supports a command line: /D - date in the form dd.mm.yyyy, if not specified, the current date is taken; /T - time in the form hh:mm:ss,if not specified,will be taken the current time; /C - the current date and time will be taken; Example of use: ConvertDateHex.exe /d18.04.2019 /t20:30:09 so if you specify: ConvertDateHex.exe /t20 - date will be taken by the current, and while 20:00:00 ConvertDateHex.exe /c - the current date and time will be taken.
Thanks for the explanation.
So, if you have a install.wim that has already been updated with same UpdatePack7R2- how can we set Doupdate=NO to skip running updatepatch (if there is no UpdatePack7R2) and UpdatePack7R2 even if the user selected install simplix?
I changed the main 7UPDATERvX.cmd to download and use win10dism.
It seems to run quicker. Is that the reason for DOWNLOAD-DISM.cmd?
Last edited by Megahertz07; 18 Apr 2019 at 17:02.