Update your Win 7 installation media

Page 25 of 144 FirstFirst ... 15232425262735125 ... LastLast

  1. Posts : 16,163
    7 X64
    Thread Starter
       #241
      My Computers


  2. Posts : 7,351
    Windows 7 HP 64
       #242

    My God, is there something related to computers that you don't plenty domain?
    Thanks
      My Computers


  3. Posts : 7,351
    Windows 7 HP 64
       #243

    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?
      My Computers


  4. Posts : 16,163
    7 X64
    Thread Starter
       #244

    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:

    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"
    Alternatively, you could write the bootorder.txt from 7updater.cmd file, after finding the language of the wim.
    Last edited by SIW2; 17 Apr 2019 at 23:40.
      My Computers


  5. Posts : 7,351
    Windows 7 HP 64
       #245

    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
      My Computers


  6. Posts : 7,351
    Windows 7 HP 64
       #246

    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?
      My Computers


  7. Posts : 16,163
    7 X64
    Thread Starter
       #247

      My Computers


  8. Posts : 16,163
    7 X64
    Thread Starter
       #248

    Megahertz07 said:
    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"


    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.
    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"
    That is to use the date from the Simplix update pack.

    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

    Code:
    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"
    %den% is 10

    %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.
      My Computers


  9. Posts : 16,163
    7 X64
    Thread Starter
       #249

    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.
      My Computers


  10. Posts : 7,351
    Windows 7 HP 64
       #250

    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.
      My Computers


 
Page 25 of 144 FirstFirst ... 15232425262735125 ... LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:08.
Find Us