Reducing the size of windows 7 iso

Discussion in 'Windows 7' started by pkgoyal, Jan 23, 2014.

  1. pkgoyal

    pkgoyal MDL Novice

    Feb 18, 2013
    15
    0
    0
    Hi is it possible to delete any unnecessary files from win 7 iso so that it can fit on a 4 gb pendrive.
    i am using a preactivated win 7 iso with DVD/USB tool but is saying insufficient memory.
     
  2. RJARRRPCGP

    RJARRRPCGP MDL Senior Member

    Feb 24, 2010
    300
    38
    10
    Unfortunately, you will get an insufficient space error when DISM'ed with hotfixes. Without removing stuff, a bigger USB pendrive is required.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. WinDev

    WinDev MDL Expert

    Jul 6, 2013
    1,226
    1,185
    60
    You can always do a compression of install.wim file with DISM.
     
  4. NICK@NUMBER11

    NICK@NUMBER11 MDL Expert

    Mar 23, 2010
    1,503
    720
    60
    #4 NICK@NUMBER11, Jan 23, 2014
    Last edited by a moderator: Apr 20, 2017
    agree, this is what i use to create a newly compressed install.wim

    Code:
    Dism /Export-Image /SourceImageFile:D:\inject7\install.wim /SourceIndex:1 /DestinationImageFile:D:\inject7\install2.wim
    
    Dism /Export-Image /SourceImageFile:D:\inject7\install.wim /SourceIndex:2 /DestinationImageFile:D:\inject7\install2.wim
    
    Dism /Export-Image /SourceImageFile:D:\inject7\install.wim /SourceIndex:3 /DestinationImageFile:D:\inject7\install2.wim
    
    Dism /Export-Image /SourceImageFile:D:\inject7\install.wim /SourceIndex:4 /DestinationImageFile:D:\inject7\install2.wim
     
  5. KNARZ

    KNARZ MDL Addicted

    Oct 9, 2012
    895
    482
    30
    #5 KNARZ, Jan 23, 2014
    Last edited by a moderator: Apr 20, 2017
    I tested in this section a few months ago and the result is interessting.
    I'm sure you can even cut also all or moste fonts... I usually only cut the foreign language fonts.

    My whole DVD (mixed Win7 and Win8 - I'm using custom Win81 boot.wim with Updated Win7SP1 - (yes higher PE can be used (also the Win8/81 Setup-Wizard) to install Win7 Wims)
    Code:
    \bootmgr| Not needed if you use EFI
    \bootx64.efi| Optional (moved the file as this is easier to select the file from root for boot)
    \setup.exe
    
    \boot\bcd
    \boot\boot.sdi
    \boot\bootfix.bin | can be deleted (is the promt to type some key)
    \boot\bootsect.exe| can be deleted 
    \boot\de-de
    \boot\etfsboot.com| can be deleted 
    \boot\fonts
    \boot\memtest.exe| can be deleted 
    \boot\resources| can be deleted (from Win8/81)
    \boot\de-de\bootsect.exe.mui| can be deleted
    \boot\fonts\malgun_boot.ttf| I guess it can be deleted (all ttfs)
    \boot\fonts\malgunn_boot.ttf
    \boot\fonts\meiryo_boot.ttf
    \boot\fonts\meiryon_boot.ttf
    \boot\fonts\msjh_boot.ttf
    \boot\fonts\msjhn_boot.ttf
    \boot\fonts\msyh_boot.ttf
    \boot\fonts\msyhn_boot.ttf
    \boot\fonts\segmono_boot.ttf
    \boot\fonts\segoe_slboot.ttf
    \boot\fonts\segoen_slboot.ttf
    \boot\fonts\wgl4_boot.ttf
    \boot\resources\bootres.dll| can be deleted (from Win8/81)
    
    ######## Whole EFI Folder only neede for EFI
    \efi\boot\bootx64.efi| same file as in root of the drive
    \efi\microsoft\boot
    \efi\microsoft\boot\bcd
    \efi\microsoft\boot\cdboot.efi
    \efi\microsoft\boot\cdboot_noprompt.efi
    \efi\microsoft\boot\efisys.bin
    \efi\microsoft\boot\efisys_noprompt.bin
    \efi\microsoft\boot\fonts
    \efi\microsoft\boot\memtest.efi
    \efi\microsoft\boot\resources
    \efi\microsoft\boot\fonts\malgun_boot.ttf
    \efi\microsoft\boot\fonts\malgunn_boot.ttf
    \efi\microsoft\boot\fonts\meiryo_boot.ttf
    \efi\microsoft\boot\fonts\meiryon_boot.ttf
    \efi\microsoft\boot\fonts\msjh_boot.ttf
    \efi\microsoft\boot\fonts\msjhn_boot.ttf
    \efi\microsoft\boot\fonts\msyh_boot.ttf
    \efi\microsoft\boot\fonts\msyhn_boot.ttf
    \efi\microsoft\boot\fonts\segmono_boot.ttf
    \efi\microsoft\boot\fonts\segoe_slboot.ttf
    \efi\microsoft\boot\fonts\segoen_slboot.ttf
    \efi\microsoft\boot\fonts\wgl4_boot.ttf
    \efi\microsoft\boot\resources\bootres.dll
    
    ######## Yes those are the only files that are needed to install a fresh image (no migration)
    \sources\boot.wim
    \sources\install.wim
    \sources\setup.exe
    
    
     
  6. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,466
    990
    60
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. pkgoyal

    pkgoyal MDL Novice

    Feb 18, 2013
    15
    0
    0
    #7 pkgoyal, Jan 23, 2014
    Last edited: Jan 23, 2014
    (OP)
    Thanks, do i need to use all the 4 codes. I don't know much about the cmd. If i rename the iso file to inject7 can i use the above code.
    Its 3.76 gb.
     
  8. Humphrey

    Humphrey MDL Expert

    Dec 13, 2011
    1,466
    990
    60
    #8 Humphrey, Jan 23, 2014
    Last edited by a moderator: Apr 20, 2017
    That is just a template. Place your own file locations in it.

    Code:
    Dism /Export-Image /SourceImageFile:D:\inject7\install.wim /SourceIndex:1 /DestinationImageFile:D:\inject7\install2.wim
    
    could be changed to 
    
    Dism /Export-Image /SourceImageFile:C:\Proiject\install.wim /SourceIndex:1 /DestinationImageFile:C:\Proiject\install2.wim
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...