Restore OEM OS from base.wim in HP RECOVERY partition

Page 2 of 2 FirstFirst 12

  1. Posts : 40
    Windows 7 Home Premium 64 bit
    Thread Starter
       #11

    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 Computer


  2. Posts : 40
    Windows 7 Home Premium 64 bit
    Thread Starter
       #12

    But gosh... a wim file is compressed so... the strings "might" also be compressed and un-findable : (
      My Computer


  3. Posts : 16,133
    7 X64
       #13

    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.
    Last edited by SIW2; 18 Dec 2018 at 11:10.
      My Computers


  4. Posts : 40
    Windows 7 Home Premium 64 bit
    Thread Starter
       #14

    Hi SIW2,

    SIW2 said:
    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 Computer


  5. Posts : 16,133
    7 X64
       #15

    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 Computers


  6. Posts : 40
    Windows 7 Home Premium 64 bit
    Thread Starter
       #16

    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
    Last edited by iBenny; 18 Dec 2018 at 17:04.
      My Computer


  7. Posts : 40
    Windows 7 Home Premium 64 bit
    Thread Starter
       #17

    SIW2 said:
    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
    Last edited by iBenny; 18 Dec 2018 at 14:30.
      My Computer


  8. Posts : 40
    Windows 7 Home Premium 64 bit
    Thread Starter
       #18

    Result : SUCCESS !!!

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

    Now, the image deployment...

    iBenny
      My Computer


  9. Posts : 40
    Windows 7 Home Premium 64 bit
    Thread Starter
       #19

    Image deployment SUCCESSFUL !!!

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

    Best regards
    iBenny
    Last edited by iBenny; 18 Dec 2018 at 17:01.
      My Computer


  10. Posts : 16,133
    7 X64
       #20

    Great
      My Computers


 
Page 2 of 2 FirstFirst 12

  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 09:24.
Find Us