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: Restore OEM OS from base.wim in HP RECOVERY partition

17 Dec 2018   #11
iBenny

Windows 7 Home Premium 64 bit
 
 

The [1].xml configuration file lists two languages en-EN and fr-FR (confirmed by their presence in the windows folder) and declares en-EN to be the default one. Maybe I'll Hex edit the base.wim file and change the default to fr-FR if you don't have an easier way to do it...


My System SpecsSystem Spec
.
17 Dec 2018   #12
iBenny

Windows 7 Home Premium 64 bit
 
 

But gosh... a wim file is compressed so... the strings "might" also be compressed and un-findable : (
My System SpecsSystem Spec
18 Dec 2018   #13
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

You can use wimlib-imagex.exe info command to change the xml image properties information.

wimlib-imagex.exe info "PATH_TO\sources\install.wim" 4 --image-property "WINDOWS/LANGUAGES/LANGUAGE=fr-FR" --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"

[Note - as above - it seems you have to change LANGUAGES/LANGUAGE as well as LANGUAGES/DEFAULT]


Wimlib-imagex.exe is included in the boot media in the Program Files\Tools\x64\wimlib folder.

So right click the Program Files\Tools\x64\wimlib folder and select command prompt.

Then enter the command into the prompt.

WIMINFO


--image-property NAME=VALUE
Specify an arbitrary per-image property to set in the XML document of the WIM file. VALUE is the string to set as the property value. NAME is the name of the image property, for example "NAME", "DESCRIPTION", or "TOTALBYTES". The name can contain forward slashes to indicate a nested XML element; for example, "WINDOWS/VERSION/BUILD" indicates the BUILD element nested within the VERSION element nested within the WINDOWS element. A bracketed number can be used to indicate one of several identically-named elements; for example, "WINDOWS/LANGUAGES/LANGUAGE[2]" indicates the second "LANGUAGE" element nested within the "WINDOWS/LANGUAGES" element. When adding a list of elements in this way, they must be specified in sequential order. Note that element names are case-sensitive. This option may be specified multiple times.

You will have to check your xml to work out the precise changes. You can use gimagex ( gimagex shortcut is in the start menu\install folder) to see if the changes worked correctly.
My System SpecsSystem Spec
.

18 Dec 2018   #14
iBenny

Windows 7 Home Premium 64 bit
 
 

Hi SIW2,

Quote   Quote: Originally Posted by SIW2 View Post
it seems you have to change LANGUAGES/LANGUAGE as well as LANGUAGES/DEFAULT]
Respectfully, guessing is not my cup of tea...

I might have found an easier and more elegant solution that you surely might be VERY interested to know about : WINXML ! What do you think about it ?

Here is my [1].xml file. the colored lines are the one to be chaged. The most relevant for our purpose is the green line. Since I have already modified a copy of [1].xml, the above suggestion might be a good solution. What do you think ?



Regards
iBenny
My System SpecsSystem Spec
18 Dec 2018   #15
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Wimlib does the job for me, and it does plenty of other things as well.

It seems you could use winxml you linked to replace the xml file - I don't have any experience of that program.
My System SpecsSystem Spec
18 Dec 2018   #16
iBenny

Windows 7 Home Premium 64 bit
 
 

Okdo so... according to my [1].xml, what should be the exact (no guessing) command line to type ?

Maybe:

wimlib-imagex.exe info "[path]\base.wim" 1 --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"
wimlib-imagex.exe info "[path]\base.wim" 2 --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"
wimlib-imagex.exe info "[path]\base.wim" 3 --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"
wimlib-imagex.exe info "[path]\base.wim" 4 --image-property "WINDOWS/LANGUAGES/DEFAULT=fr-FR"

Regards
iBenny
My System SpecsSystem Spec
18 Dec 2018   #17
iBenny

Windows 7 Home Premium 64 bit
 
 

Quote   Quote: Originally Posted by SIW2 View Post
So right click the Program Files\Tools\x64\wimlib folder and select command prompt.
Inside the Explorer of your booted Recovery CD, there is no such "Command prompt" option in the right clic window. So I copied the wimlib-imagex.exe and its dll in the location of the wim image to tweak and will reboot in normal Windows mode and do the modification there.

Doing so and renaming wimlib-imagex.exe to xml.exe shortens the command to :

xml info base.wim 1 --image-property WINDOWS/LANGUAGES/DEFAULT=fr-FR
xml info base.wim 2 --image-property WINDOWS/LANGUAGES/DEFAULT=fr-FR
xml info base.wim 3 --image-property WINDOWS/LANGUAGES/DEFAULT=fr-FR
xml info base.wim 4 --image-property WINDOWS/LANGUAGES/DEFAULT=fr-FR

Next episode to come...

iBenny
My System SpecsSystem Spec
18 Dec 2018   #18
iBenny

Windows 7 Home Premium 64 bit
 
 

Result : SUCCESS !!!

[1].xml successfully modified in base.wim !

Now, the image deployment...

iBenny
My System SpecsSystem Spec
18 Dec 2018   #19
iBenny

Windows 7 Home Premium 64 bit
 
 

Image deployment SUCCESSFUL !!!

Many thanks SIW2 for your help ! You rock man. You're a PRO...

Best regards
iBenny
My System SpecsSystem Spec
18 Dec 2018   #20
SIW2

Microsoft Community Contributor Award Recipient

Vista x64 / 7 X64
 
 

Great
My System SpecsSystem Spec
Reply

 Restore OEM OS from base.wim in HP RECOVERY partition




Thread Tools




Similar help and support threads
Thread Forum
How Do I restore this Recovery Partition on my Dell
This is a picture of my dell recovery partition. its on a spare drive that was cloned. Also a picture of the my system details. F8 did not allow me access to this partion. nor did a win 7 pro install disk nor did any of the disk that came with dell computer make it work. Its there and I want...
Installation & Setup
Restore Win 7 from Win 8 Using OEM Recovery Partition
Hi, I have an Acer Aspire that came with Win7 Home Prem. x64 installed. I made the foolish decision to upgrade to Win 8 Pro on Oct 26th when it came out, and I like the idea, but the system just isn't useable to me, and my windows updates constantly fail. no fun. When I press F8 during...
Installation & Setup
create a bootable recovery partition to restore a pc. like oem's F11
I have been fixing PCs for friends and family for years, some of them are really good at screwing up an OS a only couple months after i install a fresh copy of xp or 7. i would like to be able to create a restore method simple for them to use to reset there machine back to my initial installed...
Installation & Setup
Restore vista using hp recovery partition
Hi All I have a hp laptop dv6615em, I don't have have recovery disks with me. Couple of months back I upgraded vista to window 7. Can I recover my laptop to factory setting window vista. When i press f11 or f10 key at booting time no recovery option comes. There is no hp recovery sign in laptop...
Backup and Restore
Restore recovery partition
just another question! i format my desktop and i accidentally format the RECOVERY drive how will i put recovery drive again?
Backup and Restore


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 09:35.
Twitter Facebook Google+