murphy78 DiskPart and Apply Image Script

Discussion in 'Scripting' started by murphy78, Apr 2, 2014.

  1. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    EXE: winrecfg.exe (WinPE-WinReCfg)
    MUI: winrecfg.exe.mui (WinPE-WinReCfg_en-us)
     
  2. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    i forgot to unpack the other winre package (en-us), i've just unpacked it and indeed the mui file is there, thank you.
     
  3. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    I typically just mount the boot index of boot.wim (2) and dism /image:c:\mount /add-package /packagepath:yourpath
     
  4. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    When 10586 was released and the 10240 cabs couldn't be dism integrated anymore, you told me to just extract the cabs and copy/paste the files manually to the appropriate folders.
     
  5. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    @murphy78 : can we use the same command you posted on your first post to split install.esd in several swm files or does the command concern only install.wim file ?

    i'm talking about this one :

    dism /split-image /imagefile:c:\iso\sources\install.wim /swmfile: c:\iso\sources\install.swm /filesize:4095 /checkintegrity
     
  6. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,965
    908
    60
    I use split-wim at work atleast once a week and find it very unreliable with regards to the filesize option. (I'm upgrading the recovery on notebooks from home to pro).
    I always get 1 or 2 of the files bigger than specified. Lucky for me they are used on a ntfs formatted usb key.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    #147 mehdibleu, Jul 8, 2017
    Last edited: Jul 8, 2017
    Hello everyone,

    i need some help here.

    here's the problem, i used the script to create a recovery partition, the image system was created successfully but the problem is that i didn't manage to use the image system to restore the entire windows version, i don't know what is missing from my side but i really feel that i did all things correctly.

    when i go to "system image recovery" option through repair option from the script, error message appears saying "Windows cannot find a system image on this computer" and i don't really understand why this message appears as the image system has been created.

    one thing to say is that recovery parttion that contains the image system is not visible, you can view this partition only if you go to "disk management."

    To sum up, i converted install.wim from AIO win7 iso to install.esd file to reduce the size then i integrated the new converted install.esd into win8.1 iso and created new iso as esd files are not supported for win7.

    here's what i can say about this problem, i tried to be as clear as possible so if someone could help me and tell me what to do to be able to use that image system to restore the windows version previously installed from the script, that would be nice.
     
  8. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    Splitting a wim file only concerns non-solid wim files. I certainly wish they'd mod it to also do esd files, but we'll likely see them change the uefi loader to allow ntfs before that happens.
     
  9. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    It's possible there was something wrong with the winrecfg or Winre.wim

    Did you add the winrecfg and winrecfg-en-us files to your boot image? If not, that's likely your problem.
     
  10. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    #150 mehdibleu, Jul 9, 2017
    Last edited: Jul 12, 2017
    yes i added both cab files winrecfg and winrecfg-en-us to boot.wim with the command line posted in your first post and the command completed successfully but the problem is that i don't know if both of these files correspond to win8.1 iso as i repeat that iso that i'm using is win8.1 AIO French ISO which contains install.esd (win7) and the boot.wim that corresponds to win8.1.

    i got both of these files from @Enthousiast that told me to use script 1.2.6 for win8.1 instead of 1.2.8 as you can read in this post

    i suppose that if both of these files didn't correspond to win8.1 iso file, i wouldn't be able to add them to win8.1 boot.wim file with the command line, i would have got an error while trying to run the command line. Right ?

    This recovery partition is supposed to work as oem recovery option as the one used when you buy a new compuer with pre installed version. Right ?
    It should normally allow to do Factory Restore to go back to the windows version installed previously without the need of intervening manually during the installation.

    I've read in your first post that you have to set the WINRE boot key to F1 during boot to be able to do restore factory but how do you set that ?

    when i press F1 during the boot, nothing happens.
     
  11. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    I only showed you to use F for fast setup, did you setup the recovery option?
     
  12. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    #152 mehdibleu, Jul 10, 2017
    Last edited: Jul 10, 2017
    how do you setup the recovery option ?

    when you press "F", there is an option that allows to install windows version and create the recovery partition at the same time, so i choose that option and all went successfully. win7 installation ended successfully and the recovery partition was created as well but the problem is when i tried to restore the windows 7 using that image through the recovery partition, i didn't manage to do it.

    What do i have to do to be able to do factory restore using that recovery partition ? do i have to press on keybord key when starting the computer so that resore factory can run ?
     
  13. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,965
    908
    60
    You won't have a "System Image" unless you create one with Windows 7 Backup. this has nothing to do with WinRE really...

    Your probably better off looking at this project which will create a full recovery for you: https://forums.mydigitallife.net/threads/oem-recovery-partition-creator-for-windows.21978/
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  14. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    #154 mehdibleu, Jul 10, 2017
    Last edited: Jul 10, 2017
    so what is the use of this partition recovery that was created with windows during the installation ?
    it is an image as message appeared during the installation saying that the image was going to be created.
    THis recovery partition is 5 GB, i opened it and i found folder called Recovery which contains "install.wim" file. I suppose that file corresponds to the image created during the installation of the windows 7 version on my machine.

    this recovery partition is supposed to work as oem recovery option used when you buy a new compuer with pre installed version. Right ?
    It should normally allow to do Factory Restore to go back to the windows version installed previously without the need of intervening manually during the installation.
     
  15. Flipp3r

    Flipp3r MDL Expert

    Feb 11, 2009
    1,965
    908
    60
    Windows 7 Backup does not use the wim format & is usually in a WindowsImageBackup folder.
    I confess I haven't used the script in this thread but would assume the install.wim would be used like a factory recovery...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  16. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    yes this revovery partition should normally work as oem recovery option used when you buy a new compuer with pre installed version so yes it should allow to do Factory Restore but the problem is that i didn't manage to do the factory restore using this partition, it doesn't seem to work or maybe i am missing something to get it worked.
     
  17. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    #157 Enthousiast, Jul 10, 2017
    Last edited: Jul 10, 2017
    For some builds now the recovery of windows works almost the same as using the (R)ecovery options. You have to sysprep/capture and resetbase the installsource or recovery will set a clean windows install back (without updates etcetc).

    But it's Murphy78's script he could explain it a bit more technical.

    ps, we have to expect 2 new releases every year, the recovery will be "superseded" every new release, so i only use the script on 10 to fast delete the old install and install the new one (the diskpart part) :D
     
  18. murphy78

    murphy78 MDL DISM Enthusiast

    Nov 18, 2012
    7,389
    11,614
    240
    Easy there, chief. I didn't think about it until now, but I don't think there's an automated tool to recover from a wim image in win7.
    I know there's one in all win8 versions, but I don't know about win7. I know you can boot to winre by running "reagentc /boottore" and then restarting.
    I think in win7 they mostly dealt with the internal backup system. In win10 they abandoned the recovery partition for a refresh method.
     
  19. Enthousiast

    Enthousiast MDL Tester

    Oct 30, 2009
    47,274
    94,763
    450
    I tried all recovery options in 10 (15063.448) and none went thru :g: All got cancelled, from winre and windows reset.

    I know you never supported it on 7 but it worked, when i use my modified 8.1 boot.wim in the iso and on 8.1 too, last time i checked.
     
  20. mehdibleu

    mehdibleu MDL Expert

    Jun 14, 2017
    1,009
    251
    60
    do you mean that you were able to do factory restore using win7 ISO with murphy's script ?
    if yes, how did you manage to do it ?