Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Update your Win 7 installation media.

4 Weeks Ago   #241
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Rules for how CMD.EXE parses numbers - DosTips.com


My System SpecsSystem Spec
.
4 Weeks Ago   #242
Megahertz07

Windows 7 HP 64
 
 

Quote   Quote: Originally Posted by SIW2 View Post
My God, is there something related to computers that you don't plenty domain?
Thanks
My System SpecsSystem Spec
4 Weeks Ago   #243
Megahertz07

Windows 7 HP 64
 
 

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 System SpecsSystem Spec
.

4 Weeks Ago   #244
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

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.
My System SpecsSystem Spec
4 Weeks Ago   #245
Megahertz07

Windows 7 HP 64
 
 

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 System SpecsSystem Spec
4 Weeks Ago   #246
Megahertz07

Windows 7 HP 64
 
 

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 System SpecsSystem Spec
4 Weeks Ago   #247
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

My System SpecsSystem Spec
4 Weeks Ago   #248
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Quote   Quote: Originally Posted by Megahertz07 View Post
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
My System SpecsSystem Spec
4 Weeks Ago   #249
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

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 System SpecsSystem Spec
4 Weeks Ago   #250
Megahertz07

Windows 7 HP 64
 
 

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?
My System SpecsSystem Spec
Reply

 Update your Win 7 installation media.




Thread Tools




Similar help and support threads
Thread Forum
TEST -Update 7 installation media
Anyone who wants to give this a try: 1. Put your win7 dvd in the drive, rt click it and select COPY. Then rt click your partition (e.g. C ) and PASTE. It will take a few mins and you should have afolder on c containing the installation files, like this: 2. Install WUD - tiny program:
Installation & Setup
Windows Media Player will not update media library
I am a music downloader. It used to be that WMP12 would update the mp3 music folders to where the folder contents would read as follows: 01 'Track Name' 02 'Track Name' 03 'Track Name' and so on... This is no longer the case. WMP will not update my media library files, although it...
General Discussion
How to get installation media?
Hi, I've got an HP Pavilion laptop that came with Windows 7 installed as a Vista upgrade. I'd like to blow it away, repartition the disk for dual boot with Linux, and do a clean install of Windows 7. The only problem (I think) is that I don't have the installation media. I've searched online...
Installation & Setup
Bad installation media I think
Remember me? I'm the one with the pirated W7 Ultimate. I finally bought a genuine W7 Ultimate disk from Newegg for the tune of $310. Still working with MasterCard to get my money back. It looks favorable. When I went to do a clean install the auto-boot worked but it hung up with a blue screen...
Installation & Setup
media smart server update corrupted media center
I have 4 computers all running windows 7-3 in 32 and 1 in 64. All were working fine and no issues with my mediasmart 470 server. I only have one computer with console running. The other day pp3 came out and has made a mess of my computer that has connector to server. It seems to have corrupted...
Media Center


Our Sites

Site Links

About Us

Find 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 08:40.
Twitter Facebook